mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 12:42:58 +08:00
[brace-expansion] add typings (#18928)
This commit is contained in:
committed by
Mohamed Hegazy
parent
8464387069
commit
f18efced61
13
types/brace-expansion/brace-expansion-tests.ts
Normal file
13
types/brace-expansion/brace-expansion-tests.ts
Normal file
@@ -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
types/brace-expansion/index.d.ts
vendored
Normal file
8
types/brace-expansion/index.d.ts
vendored
Normal 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
types/brace-expansion/tsconfig.json
Normal file
22
types/brace-expansion/tsconfig.json
Normal 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
types/brace-expansion/tslint.json
Normal file
1
types/brace-expansion/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user