From c3ae41c5716da106eaa1ea8dc0d535bf59d41ead Mon Sep 17 00:00:00 2001 From: Klaus Meinhardt Date: Sat, 3 Feb 2018 22:22:13 +0100 Subject: [PATCH 1/4] Add get-caller-file --- .../get-caller-file/get-caller-file-tests.ts | 4 ++++ types/get-caller-file/index.d.ts | 9 ++++++++ types/get-caller-file/tsconfig.json | 23 +++++++++++++++++++ types/get-caller-file/tslint.json | 1 + 4 files changed, 37 insertions(+) create mode 100644 types/get-caller-file/get-caller-file-tests.ts create mode 100644 types/get-caller-file/index.d.ts create mode 100644 types/get-caller-file/tsconfig.json create mode 100644 types/get-caller-file/tslint.json 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" } From e5b6d00e3a28ee4fb6c459db198e7757a16d48db Mon Sep 17 00:00:00 2001 From: Klaus Meinhardt Date: Thu, 8 Feb 2018 17:30:24 +0100 Subject: [PATCH 2/4] Use correct name in metadata --- types/get-caller-file/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/get-caller-file/index.d.ts b/types/get-caller-file/index.d.ts index 65cbd8b6f9..953f5f15e4 100644 --- a/types/get-caller-file/index.d.ts +++ b/types/get-caller-file/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for get-caller-file 1.0 // Project: https://github.com/stefanpenner/get-caller-file#readme -// Definitions by: My Self +// Definitions by: Klaus Meinhardt // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare function getCallerFile(position?: number): string; From 76292312804a75f8cd2e5b855feebcd559473c77 Mon Sep 17 00:00:00 2001 From: Klaus Meinhardt Date: Fri, 9 Feb 2018 08:25:45 +0100 Subject: [PATCH 3/4] enable esModuleInterop --- types/get-caller-file/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/types/get-caller-file/tsconfig.json b/types/get-caller-file/tsconfig.json index 1f87ecddd2..f54443c20d 100644 --- a/types/get-caller-file/tsconfig.json +++ b/types/get-caller-file/tsconfig.json @@ -8,6 +8,7 @@ "noImplicitThis": true, "strictNullChecks": true, "strictFunctionTypes": true, + "esModuleInterop": true, "baseUrl": "../", "typeRoots": [ "../" From 86e85fd0e0e69e887ca75c1d8ab3650d9b66e8d8 Mon Sep 17 00:00:00 2001 From: Klaus Meinhardt Date: Wed, 14 Feb 2018 20:08:12 +0100 Subject: [PATCH 4/4] Remove namespace per review comment --- types/get-caller-file/index.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/types/get-caller-file/index.d.ts b/types/get-caller-file/index.d.ts index 953f5f15e4..48ba941a50 100644 --- a/types/get-caller-file/index.d.ts +++ b/types/get-caller-file/index.d.ts @@ -4,6 +4,5 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare function getCallerFile(position?: number): string; -declare namespace getCallerFile {} export = getCallerFile;