smartshell/dist/smartshell.wrap.d.ts

38 lines
941 B
TypeScript
Raw Normal View History

2017-03-10 19:14:40 +00:00
/// <reference types="node" />
import { ChildProcess } from 'child_process';
2017-03-11 12:46:08 +00:00
/**
* interface for ExecResult
*/
2017-03-10 19:14:40 +00:00
export interface IExecResult {
exitCode: number;
stdout: string;
}
2017-03-11 12:46:08 +00:00
/**
* interface for streaming ExecResult
*/
2017-03-10 19:14:40 +00:00
export interface IExecResultStreaming {
childProcess: ChildProcess;
finalPromise: Promise<IExecResult>;
}
/**
* executes a given command async
* @param commandStringArg
*/
export declare let exec: (commandStringArg: string) => Promise<IExecResult>;
/**
* executes a given command async and silent
* @param commandStringArg
*/
export declare let execSilent: (commandStringArg: string) => Promise<IExecResult>;
/**
* executes a command and allws you to stream output
*/
export declare let execStreaming: (commandStringArg: string) => {
childProcess: ChildProcess;
finalPromise: Promise<IExecResult>;
};
2017-03-11 12:46:08 +00:00
/**
* get a path
*/
export declare let which: (cmd: string) => Promise<string>;