UNPKG

800 BTypeScriptView Raw
1import { Observable } from 'rxjs';
2export interface IExec {
3 code: number;
4 cmd: string;
5 stdout?: string;
6 stderr?: string;
7}
8export interface IExecOptions {
9 silent?: boolean;
10 onExit?: () => void;
11}
12export declare class ExecutionError extends Error {
13 code: number;
14 constructor(error?: string, code?: number);
15 setCode(code: number): this;
16}
17export declare function exec(cmd: string, options?: IExecOptions): IExec;
18export declare function execWithin(path: string, cmd: string, options?: IExecOptions): IExec;
19export declare function execAsync(cmd: string, options?: IExecOptions): Promise<IExec>;
20export declare function execWithinAsync(path: string, cmd: string, options?: IExecOptions): Promise<IExec>;
21export declare function exec$(cmd: string): Observable<IExec>;