mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[globjoin] create types (#38908)
This commit is contained in:
parent
7ea9422586
commit
9d8c69e5e0
5
types/globjoin/globjoin-tests.ts
Normal file
5
types/globjoin/globjoin-tests.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import join = require('globjoin');
|
||||
|
||||
join(); // $ExpectType string
|
||||
join('1', '2', '3'); // $ExpectType string
|
||||
join('1', '2', ['a', 'b']); // $ExpectType string[]
|
||||
21
types/globjoin/index.d.ts
vendored
Normal file
21
types/globjoin/index.d.ts
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
// Type definitions for globjoin 0.1
|
||||
// Project: https://github.com/amobiz/globjoin
|
||||
// Definitions by: Gareth Jones <https://github.com/g-rath>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* Joins paths and globs.
|
||||
*
|
||||
* Like Node's {@link https://nodejs.org/api/path.html#path_path_join_path1_path2 path.join()}
|
||||
* that join all arguments together and normalize the resulting path,
|
||||
* globjoin takes arbitrary number of paths and/or arrays of paths,
|
||||
* join them together and take care of negative globs.
|
||||
*
|
||||
* @param globs
|
||||
*
|
||||
* @return the result glob, or array of globs if any of the paths/globs are array.
|
||||
*/
|
||||
declare function globjoin(...globs: string[]): string;
|
||||
declare function globjoin(...globs: Array<string | string[]>): string[];
|
||||
|
||||
export = globjoin;
|
||||
23
types/globjoin/tsconfig.json
Normal file
23
types/globjoin/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"globjoin-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/globjoin/tslint.json
Normal file
1
types/globjoin/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user