diff --git a/types/brace-expansion/brace-expansion-tests.ts b/types/brace-expansion/brace-expansion-tests.ts new file mode 100644 index 0000000000..a9b0955cd7 --- /dev/null +++ b/types/brace-expansion/brace-expansion-tests.ts @@ -0,0 +1,13 @@ +import expand = require('brace-expansion'); + +// $ExpectType string[] +expand('file-{a,b,c}.jpg'); +expand('-v{,,}'); +expand('file{0..2}.jpg'); +expand('file-{a..c}.jpg'); +expand('file{2..0}.jpg'); +expand('file{0..4..2}.jpg'); +expand('file-{a..e..2}.jpg'); +expand('file{00..10..5}.jpg'); +expand('{{A..C},{a..c}}'); +expand('ppp{,config,oe{,conf}}'); diff --git a/types/brace-expansion/index.d.ts b/types/brace-expansion/index.d.ts new file mode 100644 index 0000000000..0c1894fd8c --- /dev/null +++ b/types/brace-expansion/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for brace-expansion 1.1 +// Project: https://github.com/juliangruber/brace-expansion +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = expand; + +declare function expand(input: string): string[]; diff --git a/types/brace-expansion/tsconfig.json b/types/brace-expansion/tsconfig.json new file mode 100644 index 0000000000..ef79d3729f --- /dev/null +++ b/types/brace-expansion/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "brace-expansion-tests.ts" + ] +} diff --git a/types/brace-expansion/tslint.json b/types/brace-expansion/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/brace-expansion/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }