UNPKG

959 BTypeScriptView Raw
1/// <reference types="node" />
2import { StdioOptions } from "child_process";
3import { Logger } from "./common";
4interface IOptions {
5 cwd?: string;
6 async?: boolean;
7 stdio?: StdioOptions;
8 env?: NodeJS.ProcessEnv;
9 timeout?: number;
10}
11interface ICliOptions {
12 [key: string]: string;
13}
14interface ITaskContext {
15 options?: ICliOptions;
16}
17interface ITaskFunction {
18 (...args: any[]): any;
19 help?: any;
20}
21export declare function run(command: string, options: IOptions & {
22 async: true;
23}, logger?: Logger): Promise<string | null>;
24export declare function run(command: string, options?: IOptions & {
25 async?: false | null;
26}, logger?: Logger): string | null;
27/**
28 * @deprecated
29 */
30export declare function option(thisObj: ITaskContext | null, name?: string): any;
31export declare function options(thisObj: ITaskContext | null): object;
32export declare function help(func: ITaskFunction, annotation?: string | any): void;
33export {};