Merge pull request #31692 from BendingBender/npm-paths

[npm-paths] Add types
This commit is contained in:
Wesley Wigham
2018-12-25 22:38:57 -08:00
committed by GitHub
4 changed files with 37 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for npm-paths 2.0
// Project: https://github.com/jonschlinkert/npm-paths
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = npmPaths;
declare function npmPaths(cwd?: string | { cwd: string }): string[];
+5
View File
@@ -0,0 +1,5 @@
import paths = require('npm-paths');
paths(); // $ExpectType string[]
paths('some/directory'); // $ExpectType string[]
paths({ cwd: 'some/directory' }); // $ExpectType string[]
+23
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",
"npm-paths-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }