mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Add types for concurrently (#38580)
This commit is contained in:
parent
7e6c90c6e2
commit
95fa61dc89
20
types/concurrently/concurrently-tests.ts
Normal file
20
types/concurrently/concurrently-tests.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import * as concurrently from 'concurrently';
|
||||
|
||||
concurrently(['echo foo']); // $ExpectType Promise<null>
|
||||
// $ExpectType Promise<null>
|
||||
concurrently(
|
||||
[
|
||||
'echo foo',
|
||||
{
|
||||
command: 'echo bar',
|
||||
name: 'bar',
|
||||
prefixColor: 'yellow',
|
||||
},
|
||||
],
|
||||
{
|
||||
prefix: 'foo',
|
||||
killOthers: ['success'],
|
||||
},
|
||||
);
|
||||
|
||||
concurrently('foo'); // $ExpectError
|
||||
34
types/concurrently/index.d.ts
vendored
Normal file
34
types/concurrently/index.d.ts
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
// Type definitions for concurrently 4.1
|
||||
// Project: https://github.com/kimmobrunfeldt/concurrently#readme
|
||||
// Definitions by: Michael B. <https://github.com/Blasz>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
export = concurrently;
|
||||
|
||||
declare function concurrently(
|
||||
commands: Array<concurrently.CommandObj | string>,
|
||||
options?: concurrently.Options,
|
||||
): Promise<null>;
|
||||
|
||||
declare namespace concurrently {
|
||||
interface CommandObj {
|
||||
command: string;
|
||||
name?: string;
|
||||
prefixColor?: string;
|
||||
}
|
||||
interface Options {
|
||||
defaultInputTarget?: number;
|
||||
inputStream?: NodeJS.ReadableStream;
|
||||
killOthers?: Array<'success' | 'failure'>;
|
||||
outputStream?: NodeJS.WritableStream;
|
||||
prefix?: 'index' | 'pid' | 'time' | 'command' | 'name' | 'none' | string;
|
||||
prefixLength?: number;
|
||||
raw?: boolean;
|
||||
restartTries?: number;
|
||||
restartDelay?: number;
|
||||
successCondition?: 'first' | 'last';
|
||||
timestampFormat?: string;
|
||||
}
|
||||
}
|
||||
23
types/concurrently/tsconfig.json
Normal file
23
types/concurrently/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",
|
||||
"concurrently-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/concurrently/tslint.json
Normal file
1
types/concurrently/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user