[brace-expansion] add typings (#18928)

This commit is contained in:
Dimitri Benin
2017-08-14 10:03:31 -07:00
committed by Mohamed Hegazy
parent 8464387069
commit f18efced61
4 changed files with 44 additions and 0 deletions
@@ -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}}');
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for brace-expansion 1.1
// Project: https://github.com/juliangruber/brace-expansion
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = expand;
declare function expand(input: string): string[];
+22
View File
@@ -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"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }