Skip to content

Instantly share code, notes, and snippets.

@mizdra
Last active December 15, 2015 10:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mizdra/d1cf87b734cfb6359dab to your computer and use it in GitHub Desktop.
Save mizdra/d1cf87b734cfb6359dab to your computer and use it in GitHub Desktop.
ts-sample
export class Hello {
static say() {
console.log('Hello TypeScript!');
}
}
export class Word {
private word: string;
setWord(word: string) {
this.word = word;
}
getWord() {
return this.word;
}
}
import {Hello, Word} from './helloModule';
Hello.say();
let word = new Word();
word.setWord('ES6');
console.log(word.getWord());
{
"compilerOptions": {
"module": "commonjs",
"target": "ES5",
"noImplicitAny": true,
"outDir": "./lib"
},
"files": [
"./src/helloModule.ts",
"./src/index.ts"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment