Created
April 4, 2016 03:21
-
-
Save fay-jai/d70d85c337b8054d955a2f9784c452d6 to your computer and use it in GitHub Desktop.
Exploring Typescript Internal and External Modules
This file contains hidden or 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 * as SomeModule from "./module1"; | |
import * as AnotherModule from "./module2"; | |
console.log(SomeModule.sayHello("Willson")); | |
console.log(AnotherModule.add(1, 2, 3, 4)); | |
/* | |
NOTE: this is the compiled JavaScript, assuming CommonJS module format | |
"use strict"; | |
var SomeModule = require("./module1"); | |
var AnotherModule = require("./module2"); | |
console.log(SomeModule.sayHello("Willson")); | |
console.log(AnotherModule.add(1, 2, 3, 4)); | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment