Skip to content

Conversation

vladima
Copy link
Contributor

@vladima vladima commented Apr 28, 2015

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.

setters:[
function (_bar_1) {
for (var n in _bar_1)
if (!exportedNames_1.hasOwnProperty(n)) exports_1(n, _bar_1[n]);
Copy link
Contributor

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

Copy link
Contributor Author

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");
Copy link
Contributor

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.

@mhegazy
Copy link
Contributor

mhegazy commented Apr 29, 2015

👍

vladima added a commit that referenced this pull request Apr 29, 2015
@vladima vladima merged commit 377b48f into master Apr 29, 2015
@vladima vladima deleted the localStorageForExportedNames branch April 29, 2015 21:08
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants