Added type definitions for is-valid-path.

This commit is contained in:
s8kggu_zlatkoa
2019-01-03 15:33:07 +01:00
parent 11fa39a926
commit 6637b2df5e
4 changed files with 50 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for is-valid-path 0.1
// Project: https://github.com/jonschlinkert/is-valid-path
// Definitions by: Zlatko Andonovski <https://github.com/Goldsmith42>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function isValidPath(path?: string | null): boolean;
export = isValidPath;
@@ -0,0 +1,18 @@
// Tests are from the NPM README (https://www.npmjs.com/package/is-valid-path).
import isValid = require('is-valid-path');
isValid('abc.js');
isValid('abc/def/ghi.js');
isValid('foo.js');
isValid();
isValid(null);
isValid('!foo.js');
isValid('*.js');
isValid('**/abc.js');
isValid('abc/*.js');
isValid('abc/(aaa|bbb).js');
isValid('abc/[a-z].js');
isValid('abc/{a,b}.js');
isValid('abc/?.js');
+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",
"is-valid-path-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }