Skip to content

Instantly share code, notes, and snippets.

@thomasboyt
Last active August 29, 2015 13:56
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 thomasboyt/9340259 to your computer and use it in GitHub Desktop.
Save thomasboyt/9340259 to your computer and use it in GitHub Desktop.
static analysis required for transpiler++
// a.js
export var a = 3;
// b.js
import { a } from "a";
console.log(a); // 3
function foo() {
var a = 5;
console.log(a); // 5
}
function bar() {
console.log(a); // 3
}
//should become
define(["a"], function(__dependency1__) {
console.log(__dependency1__.a); // 3
function foo() {
var a = 5;
console.log(a); // 5
}
function bar() {
console.log(__dependency1__.a); // 3
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment