-
Notifications
You must be signed in to change notification settings - Fork 13k
Store exported names locally #2948
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
Conversation
setters:[ | ||
function (_bar_1) { | ||
for (var n in _bar_1) | ||
if (!exportedNames_1.hasOwnProperty(n)) exports_1(n, _bar_1[n]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export var x;
export * from "A"; //y
export * from "B"; //y
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
per spec (15.2.1.16.3 ResolveExport( exportName, resolveSet, exportStarSet ) Concrete Method) if some name can be resolved from more than one star export the result is ambiguous, When re-exports and imports are resolved during module instantiation it is a syntax error to have ambiguous resolution (per 15.2.1.16.4 ModuleDeclarationInstantiation( ) Concrete Method).Since this situation is an error (not sure if ES6 module loader treats it as such) I think it is ok to keep this aspect implementation specific.
emitNodeWithoutSourceMap(node); | ||
} | ||
else if (node.flags & NodeFlags.Default) { | ||
write("default"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be should filter out default all the time.
👍 |
Generate a local object that will store names of local/indirectly exported entries. This object is later used to check that names from star exports don't shadow local/indirectly exported names.