-
Notifications
You must be signed in to change notification settings - Fork 812
Open
Description
Steps to reproduce
// some-library.d.ts
type T = { value: string | T };
declare namespace ns {
export type NsValue = T;
export function fn(val: ns.NsValue): void;
}
export { ns };import { ns } from "test-library";
export const fn = (val: ns.NsValue) => ns.fn(val);Here's a repro repo: https://github.com/Retsam/ts-go-namespace-declaration-emit-issue
Behavior with typescript@5.9
No error, emits:
import { ns } from "test-library";
export declare const fn: (val: ns.NsValue) => void;Behavior with tsgo
Exported variable 'fn' has or is using name 'T' from external module "/Users/hunter2/ts-go-issue/types/test-library/index" but cannot be named.
4 export const fn = (val: ns.NsValue) => ns.fn(val);
There's a a few other declaration tickets open, but none of them looked like close matches to this behavior.
Metadata
Metadata
Assignees
Labels
No labels