Skip to content
Myr

Tweak the TS definition

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sindre Sorhus · committed by Sindre Sorhus · parent 3db7d2c · Browse files · 1 file+16 added−18 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+16 added−18 removed

  • other:+16 added−18 removed

1 file+16 added−18 removed

modified:index.d.ts+16 added-18 removed
232 unmodified lines
233 */234 killed: boolean;235}236237export interface ExecaSyncReturnValue<StdOutErrType = string>238 extends ExecaReturnBase<StdOutErrType> {237export interface ExecaSyncReturnValue<StdoutErrorType = string>238 extends ExecaReturnBase<StdoutErrorType> {239 /**240 The exit code of the process that was run.241 */242 code: number;243}244245export interface ExecaReturnValue<StdOutErrType = string>246 extends ExecaSyncReturnValue<StdOutErrType> {245export interface ExecaReturnValue<StdoutErrorType = string>246 extends ExecaSyncReturnValue<StdoutErrorType> {247 /**248 The output of the process with `stdout` and `stderr` interleaved.249 */250 all: StdOutErrType;250 all: StdoutErrorType;251252 /**253 Whether the process was canceled.254 */255 isCanceled: boolean;256}257258export interface ExecaSyncError<StdOutErrType = string>258export interface ExecaSyncError<StdoutErrorType = string>259 extends Error,260 ExecaReturnBase<StdOutErrType> {260 ExecaReturnBase<StdoutErrorType> {261 /**262 The error message.263 */264 message: string;
3 unmodified lines
268 */269 code: number | string;270}271272export interface ExecaError<StdOutErrType = string>273 extends ExecaSyncError<StdOutErrType> {272export interface ExecaError<StdoutErrorType = string>273 extends ExecaSyncError<StdoutErrorType> {274 /**275 The output of the process with `stdout` and `stderr` interleaved.276 */277 all: StdOutErrType;277 all: StdoutErrorType;278279 /**280 Whether the process was canceled.281 */282 isCanceled: boolean;283}284285export interface ExecaChildPromise<StdOutErrType> {285export interface ExecaChildPromise<StdoutErrorType> {286 catch<ResultType = never>(287 onRejected?:288 | ((289 reason: ExecaError<StdOutErrType>290 ) => ResultType | PromiseLike<ResultType>)288 | ((reason: ExecaError<StdoutErrorType>) => ResultType | PromiseLike<ResultType>)289 | null292 ): Promise<ExecaReturnValue<StdOutErrType> | ResultType>;290 ): Promise<ExecaReturnValue<StdoutErrorType> | ResultType>;291292 /**293 Cancel the subprocess.294
1 unmodified line
296 */297 cancel(): void;298}299302export type ExecaChildProcess<StdOutErrType = string> = ChildProcess &303 ExecaChildPromise<StdOutErrType> &304 Promise<ExecaReturnValue<StdOutErrType>>;300export type ExecaChildProcess<StdoutErrorType = string> = ChildProcess &301 ExecaChildPromise<StdoutErrorType> &302 Promise<ExecaReturnValue<StdoutErrorType>>;303304declare const execa: {305 /**306 Execute a file.
186 unmodified lines