diff --git a/types/npm-paths/index.d.ts b/types/npm-paths/index.d.ts new file mode 100644 index 0000000000..67fc8c4772 --- /dev/null +++ b/types/npm-paths/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for npm-paths 2.0 +// Project: https://github.com/jonschlinkert/npm-paths +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = npmPaths; + +declare function npmPaths(cwd?: string | { cwd: string }): string[]; diff --git a/types/npm-paths/npm-paths-tests.ts b/types/npm-paths/npm-paths-tests.ts new file mode 100644 index 0000000000..b823783e57 --- /dev/null +++ b/types/npm-paths/npm-paths-tests.ts @@ -0,0 +1,5 @@ +import paths = require('npm-paths'); + +paths(); // $ExpectType string[] +paths('some/directory'); // $ExpectType string[] +paths({ cwd: 'some/directory' }); // $ExpectType string[] diff --git a/types/npm-paths/tsconfig.json b/types/npm-paths/tsconfig.json new file mode 100644 index 0000000000..86f00bbc85 --- /dev/null +++ b/types/npm-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", + "npm-paths-tests.ts" + ] +} diff --git a/types/npm-paths/tslint.json b/types/npm-paths/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/npm-paths/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }