Last active
August 29, 2015 13:56
-
-
Save thomasboyt/9340259 to your computer and use it in GitHub Desktop.
static analysis required for transpiler++
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
// 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