Created
August 10, 2014 17:44
-
-
Save jwerle/9b239215fc5e1a3e4125 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import foo from A; // - this just declares the identifier `foo' | |
console.log(foo); // undefined - (but doesn't throw ?) | |
console.log(A.foo); // [Function: foo] - (maybe this is available due to the `import' statement) | |
console.log(B.bar); // [Function: bar] - (I guess not, there is no need for an `import' statement for the `B' module?) | |
/** | |
* The following will throw: | |
* | |
* let foo = A.foo; // throws `SyntaxError: Identifier 'foo' has already been declared' | |
*/ | |
module A { | |
export function foo () { | |
return 'foo' | |
} | |
} | |
module B { | |
export bar | |
function bar () { | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module-linking.js Get rid of static module allocation, do it in code. 2 years ago | |
module-parsing.js Reject local module declarations. 2 years ago | |
module-recompile.js Implement proper module linking. 2 years ago | |
module-resolution.js Implement proper module linking. 2 years ago |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment