mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #31666 from BendingBender/is-valid-glob
[is-valid-glob] Add types
This commit is contained in:
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
// Type definitions for is-valid-glob 1.0
|
||||
// Project: https://github.com/jonschlinkert/is-valid-glob
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = isValidGlob;
|
||||
|
||||
declare function isValidGlob(input: any): input is string | string[];
|
||||
@@ -0,0 +1,7 @@
|
||||
import isValidGlob = require('is-valid-glob');
|
||||
|
||||
const input: any = 'foo/*.js';
|
||||
|
||||
if (isValidGlob(input)) {
|
||||
input; // $ExpectType string | string[]
|
||||
}
|
||||
@@ -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-glob-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user