Created
July 27, 2015 23:03
-
-
Save vladima/25d05c091697d3df1dea 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
<html> | |
<head> | |
<title>Test</title> | |
<script language="javascript" src="system.js"></script> | |
<script> | |
System.config({ | |
paths: { | |
'*': '*.js' | |
} | |
}); | |
System.import("m1").then(function (m) { | |
alert(m.t) | |
}) | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
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
// m1.js | |
System.register(["m2", "m2"], function(exports_1) { | |
var m2_1, m2_2; | |
var t; | |
return { | |
setters:[ | |
function (_m2_1) { | |
m2_1 = _m2_1; | |
}, | |
function (_m2_2) { | |
m2_2 = _m2_2; | |
}], | |
execute: function() { | |
exports_1("t", t = m2_1.x + m2_2.y); | |
} | |
} | |
}); |
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
// m1.ts | |
import {x} from "m2"; | |
import {y} from "m2"; | |
export let t = x + y; |
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
// m2.js | |
System.register([], function(exports_1) { | |
var x, y; | |
return { | |
setters:[], | |
execute: function() { | |
exports_1("x", x = 1); | |
exports_1("y", y = 2); | |
} | |
} | |
}); |
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
// m2.ts | |
export let x = 1; | |
export var y = 2; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment