From 41ab1c7c3f9794f5ae4fb32212e49285839b38a9 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Wed, 26 Dec 2018 00:42:36 +0100 Subject: [PATCH] [global-paths] Add types --- types/global-paths/global-paths-tests.ts | 4 ++++ types/global-paths/index.d.ts | 8 ++++++++ types/global-paths/tsconfig.json | 23 +++++++++++++++++++++++ types/global-paths/tslint.json | 1 + 4 files changed, 36 insertions(+) create mode 100644 types/global-paths/global-paths-tests.ts create mode 100644 types/global-paths/index.d.ts create mode 100644 types/global-paths/tsconfig.json create mode 100644 types/global-paths/tslint.json diff --git a/types/global-paths/global-paths-tests.ts b/types/global-paths/global-paths-tests.ts new file mode 100644 index 0000000000..3038b65c1b --- /dev/null +++ b/types/global-paths/global-paths-tests.ts @@ -0,0 +1,4 @@ +import paths = require('global-paths'); + +paths(); // $ExpectType string[] +paths('foo'); // $ExpectType string[] diff --git a/types/global-paths/index.d.ts b/types/global-paths/index.d.ts new file mode 100644 index 0000000000..0ae365b07f --- /dev/null +++ b/types/global-paths/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for global-paths 1.0 +// Project: https://github.com/jonschlinkert/global-paths +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = globalPaths; + +declare function globalPaths(cwd?: string): string[]; diff --git a/types/global-paths/tsconfig.json b/types/global-paths/tsconfig.json new file mode 100644 index 0000000000..85f6aaba4f --- /dev/null +++ b/types/global-paths/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", + "global-paths-tests.ts" + ] +} diff --git a/types/global-paths/tslint.json b/types/global-paths/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/global-paths/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }