-
Notifications
You must be signed in to change notification settings - Fork 716
Open
Labels
Domain: Declaration EmitRelated to declaration emit, type printingRelated to declaration emit, type printingDomain: Type CheckingRelated to type checking, grammar checkingRelated to type checking, grammar checking
Description
Steps to reproduce
// @filename: source.ts
class Foo<T> {
#p!: T;
}
interface Bar {
value: number
}
export default new Foo<Bar>();
// @filename: index.ts
import foo from './source';
// Error in tsgo
export default {
foo
} as {
foo: typeof foo
}
Behavior with typescript@5.8
The type for _default
uses the type from the assertion.
Behavior with tsgo
Assertion types are ignored and we get the error: Default export of the module has or is using private name 'Bar'.
(also happens to other variables)
Metadata
Metadata
Assignees
Labels
Domain: Declaration EmitRelated to declaration emit, type printingRelated to declaration emit, type printingDomain: Type CheckingRelated to type checking, grammar checkingRelated to type checking, grammar checking