Add is-negated-glob (#22573)

* Add is-negated-glob

* Use ImportEquals instead of namespace import
This commit is contained in:
Klaus Meinhardt 2018-01-04 18:24:20 +01:00 committed by Mohamed Hegazy
parent e3c87baad7
commit c9f8a8f8be
4 changed files with 44 additions and 0 deletions

14
types/is-negated-glob/index.d.ts vendored Normal file
View File

@ -0,0 +1,14 @@
// Type definitions for is-negated-glob 1.0
// Project: https://github.com/jonschlinkert/is-negated-glob
// Definitions by: Klaus Meinhardt <https://github.com/ajafff>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function isNegatedGlob(pattern: string): isNegatedGlob.Result;
declare namespace isNegatedGlob {
interface Result {
negated: boolean;
original: string;
pattern: string;
}
}
export = isNegatedGlob;

View File

@ -0,0 +1,6 @@
import isNegatedGlob = require('is-negated-glob');
const result = isNegatedGlob('!foo.*');
const negated: boolean = result.negated;
const original: string = result.original;
const pattern: string = result.pattern;

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-negated-glob-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }