Created
May 8, 2017 21:46
-
-
Save Pyrolistical/f6d5acf7746203aadb46e905de5b8054 to your computer and use it in GitHub Desktop.
typescript checkJs + node
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 interface AnotherfileStatic { | |
validfunction(greeting: string); | |
} | |
declare const Anotherfile: AnotherfileStatic; | |
export default Anotherfile; |
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.exports = { | |
validfunction(greeting) { | |
console.log(greeting); | |
} | |
}; |
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
const anotherfile = require('./anotherfile'); | |
anotherfile.validfunction('hello'); |
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
{ | |
"name": "tstest", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC", | |
"dependencies": { | |
"@types/node": "7.0.18", | |
"typescript": "2.3.2" | |
} | |
} |
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": { | |
"noEmit": true, | |
"module": "commonjs", | |
"allowJs": true, | |
"checkJs": true, | |
"target": "es6", | |
"types": [ | |
"node" | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment