-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
Breaking ChangeWould introduce errors in existing codeWould introduce errors in existing codeBugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
Currently if you have the following file m1.ts
export default function Decl() {
return 0;
}
export interface Decl {
p1: number;
p2: number;
}
export namespace Decl {
export var x = 10;
export var y = 20;
interface I {
}
}
trying to import m1.ts
with a default binding will not give you all meanings of the exported entity:
import Entity from "m1"
Entity();
var x: Entity; // error
var y: Entity.I; // error
Entity.x; // error
Entity.y; // error
Discussed this with @JsonFreeman and @vladima, will try to elaborate more, but this issue should serve as a discussion point for suggestions, since there are certain interesting cases like non-exported uninstantiated namespaces.
Metadata
Metadata
Assignees
Labels
Breaking ChangeWould introduce errors in existing codeWould introduce errors in existing codeBugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue