Created
August 19, 2015 08:09
-
-
Save Petah/96cb895bec02867ad111 to your computer and use it in GitHub Desktop.
TypeScript interface, function, variable
This file contains hidden or 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
| /// <reference path="some-name.ts" /> | |
| /// <reference path="master.ts" /> |
This file contains hidden or 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 * as someName from 'someName'; | |
| someName('grr', 'arr', 'arg'); |
This file contains hidden or 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
| C:\work\temp\ts>tsc | |
| master.ts(1,27): error TS2307: Cannot find module 'someName'. |
This file contains hidden or 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
| interface someName { | |
| (...args: any[]): someName; | |
| } | |
| declare var someName: someName; | |
| export = someName; |
This file contains hidden or 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", | |
| "out": "dist.js", | |
| "sourceMap": true | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment