Skip to content

Instantly share code, notes, and snippets.

@frankbille
Created May 26, 2015 17:57
Show Gist options
  • Save frankbille/d73d2f27ad1c56c6a2cc to your computer and use it in GitHub Desktop.
Save frankbille/d73d2f27ad1c56c6a2cc to your computer and use it in GitHub Desktop.
TypeScript module visibility
module hello {
export interface IHelloWorld {
greet(name:string):string;
}
class HelloWorld implements IHelloWorld {
greet(name:string):string {
return 'Hello ' + name;
}
}
}
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