From c9f8a8f8be8bfa997b9d442c9542a4edc55728a2 Mon Sep 17 00:00:00 2001 From: Klaus Meinhardt Date: Thu, 4 Jan 2018 18:24:20 +0100 Subject: [PATCH] Add is-negated-glob (#22573) * Add is-negated-glob * Use ImportEquals instead of namespace import --- types/is-negated-glob/index.d.ts | 14 +++++++++++ .../is-negated-glob/is-negated-glob-tests.ts | 6 +++++ types/is-negated-glob/tsconfig.json | 23 +++++++++++++++++++ types/is-negated-glob/tslint.json | 1 + 4 files changed, 44 insertions(+) create mode 100644 types/is-negated-glob/index.d.ts create mode 100644 types/is-negated-glob/is-negated-glob-tests.ts create mode 100644 types/is-negated-glob/tsconfig.json create mode 100644 types/is-negated-glob/tslint.json diff --git a/types/is-negated-glob/index.d.ts b/types/is-negated-glob/index.d.ts new file mode 100644 index 0000000000..a5a4d3ca53 --- /dev/null +++ b/types/is-negated-glob/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for is-negated-glob 1.0 +// Project: https://github.com/jonschlinkert/is-negated-glob +// Definitions by: Klaus Meinhardt +// 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; diff --git a/types/is-negated-glob/is-negated-glob-tests.ts b/types/is-negated-glob/is-negated-glob-tests.ts new file mode 100644 index 0000000000..55b190bdd9 --- /dev/null +++ b/types/is-negated-glob/is-negated-glob-tests.ts @@ -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; diff --git a/types/is-negated-glob/tsconfig.json b/types/is-negated-glob/tsconfig.json new file mode 100644 index 0000000000..9f8db73020 --- /dev/null +++ b/types/is-negated-glob/tsconfig.json @@ -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" + ] +} diff --git a/types/is-negated-glob/tslint.json b/types/is-negated-glob/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/is-negated-glob/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }