Merge pull request #31694 from BendingBender/cwd

[cwd] Add types
This commit is contained in:
Wesley Wigham
2018-12-25 22:39:45 -08:00
committed by GitHub
4 changed files with 39 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
import cwd = require('cwd');
cwd(); // $ExpectType string
cwd('one/two.js'); // $ExpectType string
cwd('one', 'two.js'); // $ExpectType string
cwd(['one', 'two.js']); // $ExpectType string
+9
View File
@@ -0,0 +1,9 @@
// Type definitions for cwd 0.10
// Project: https://github.com/jonschlinkert/cwd
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = cwd;
declare function cwd(pathSegments: string[]): string;
declare function cwd(...pathSegments: string[]): 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",
"cwd-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }