-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dotted names in export assignments #4325
Comments
adding @alexeagle since he reported this issue originally |
+cc @mprobst |
We have another report of this issue for |
As a work around, you can use aliases: declare module foo.bar {
export type X = number;
export var X: { A: number };
}
declare module "test" {
import _alias = foo.bar;
export = _alias;
} |
Do we need to do anything here other than update the spec? |
yes. we need to implement it. currently we only support exporting all meanings of The main issue we can not trust that a dotted name resolves to a single symbol that we can resolve to. so what we need is create a new alias symbol, and then resolve the module to that. i.e. emulate: import _export = a.b.c;
export = _export; |
Current description of export assignments in the spec states:
However current implementation also permits dotted names - in this case only value meaning is exported. This change seems to be quite recent, example below compiles with no errors in current master and issues a syntax error
';' expected."
in v1.4.This issue can have several interpretations:
The text was updated successfully, but these errors were encountered: