Created
May 26, 2015 17:57
-
-
Save frankbille/d73d2f27ad1c56c6a2cc to your computer and use it in GitHub Desktop.
TypeScript module visibility
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
module hello { | |
export interface IHelloWorld { | |
greet(name:string):string; | |
} | |
class HelloWorld implements IHelloWorld { | |
greet(name:string):string { | |
return 'Hello ' + name; | |
} | |
} | |
} |
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
module hello { | |
var helloWorld = new HelloWorld(); | |
console.log(helloWorld.greet('John Snow')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment