Skip to content

Instantly share code, notes, and snippets.

@jwerle
Created August 10, 2014 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwerle/9b239215fc5e1a3e4125 to your computer and use it in GitHub Desktop.
Save jwerle/9b239215fc5e1a3e4125 to your computer and use it in GitHub Desktop.
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 () {
}
}
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