Last active
December 15, 2015 10:12
-
-
Save mizdra/d1cf87b734cfb6359dab to your computer and use it in GitHub Desktop.
ts-sample
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
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; | |
} | |
} |
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
import {Hello, Word} from './helloModule'; | |
Hello.say(); | |
let word = new Word(); | |
word.setWord('ES6'); | |
console.log(word.getWord()); |
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
Show hidden characters
{ | |
"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