diff --git a/types/get-caller-file/get-caller-file-tests.ts b/types/get-caller-file/get-caller-file-tests.ts new file mode 100644 index 0000000000..b7fdd9a8a4 --- /dev/null +++ b/types/get-caller-file/get-caller-file-tests.ts @@ -0,0 +1,4 @@ +import getCallerFile = require('get-caller-file'); + +let caller: string = getCallerFile(); +caller = getCallerFile(3); diff --git a/types/get-caller-file/index.d.ts b/types/get-caller-file/index.d.ts new file mode 100644 index 0000000000..65cbd8b6f9 --- /dev/null +++ b/types/get-caller-file/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for get-caller-file 1.0 +// Project: https://github.com/stefanpenner/get-caller-file#readme +// Definitions by: My Self +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function getCallerFile(position?: number): string; +declare namespace getCallerFile {} + +export = getCallerFile; diff --git a/types/get-caller-file/tsconfig.json b/types/get-caller-file/tsconfig.json new file mode 100644 index 0000000000..1f87ecddd2 --- /dev/null +++ b/types/get-caller-file/tsconfig.json @@ -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", + "get-caller-file-tests.ts" + ] +} diff --git a/types/get-caller-file/tslint.json b/types/get-caller-file/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/get-caller-file/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }