typedefinition for Caller (#29406)

* typedefinition for Caller

* edit comment

change comment Definitions information, 
delete useless  comment

* edit comment

* remove patch version
* restore Definitions line
This commit is contained in:
sungmin kim 2018-10-05 02:54:05 +09:00 committed by Wesley Wigham
parent 65da46f368
commit 5fa7e99518
4 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,4 @@
import caller = require('caller');
const callerFile: string = caller();
const callerFile2: string = caller(1);

8
types/caller/index.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
// Type definitions for caller 1.0
// Project: https://github.com/totherik/caller
// Definitions by: Ignocide <https://github.com/ignocide>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function caller(depth?: number): string;
export = caller;

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"caller-tests.ts"
]
}

1
types/caller/tslint.json Normal file
View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }