-
Notifications
You must be signed in to change notification settings - Fork 756
Open
Labels
Domain: Declaration EmitRelated to declaration emit, type printingRelated to declaration emit, type printingbugSomething isn't workingSomething isn't working
Description
Steps to reproduce
tsconfig.json:
{
"compilerOptions": {
"module": "Node18",
"skipLibCheck": true,
"declaration": true,
"declarationMap": true,
}
}
schema.ts:
import { SUBSCHEMA } from './subschema.js'
export const SCHEMA = {
...SUBSCHEMA,
} as const
subschema.ts:
import { Teams } from './teams.js'
export const SUBSCHEMA = {
'item': {
teamName: Teams.A,
},
} as const
teams.ts:
export enum Teams {
A = 'a',
B = 'b',
}
Behavior with typescript@5.9
Emit for schema.d.ts:
export declare const SCHEMA: {
readonly item: {
readonly teamName: import("./teams.js").Teams.A;
};
};
//# sourceMappingURL=schema.d.ts.map
Behavior with tsgo
Emit for schema.d.ts:
export declare const SCHEMA: {
readonly item: {
readonly teamName: import("./teams.js").A;
};
};
//# sourceMappingURL=schema.d.ts.map
Which is an error on line 3:
Namespace '"/Users/john/scratch/teams"' has no exported member 'A'. ts(2694)
Metadata
Metadata
Assignees
Labels
Domain: Declaration EmitRelated to declaration emit, type printingRelated to declaration emit, type printingbugSomething isn't workingSomething isn't working