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
Provenance
- Commit
f2cb86f- Tree
65d8b89- Author
Sindre Sorhus <sindresorhus@gmail.com>- Committer
Sindre Sorhus <sindresorhus@gmail.com>- Parent
3db7d2c
1 file changed+16 added−18 removed
modified:index.d.ts+16 added-18 removed
232 unmodified lines233 */234 killed: boolean;235 }236 237-export interface ExecaSyncReturnValue<StdOutErrType = string>238- extends ExecaReturnBase<StdOutErrType> {237+export interface ExecaSyncReturnValue<StdoutErrorType = string>238+ extends ExecaReturnBase<StdoutErrorType> {239 /**240 The exit code of the process that was run.241 */242 code: number;243 }244 245-export interface ExecaReturnValue<StdOutErrType = string>246- extends ExecaSyncReturnValue<StdOutErrType> {245+export 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;251 252 /**253 Whether the process was canceled.254 */255 isCanceled: boolean;256 }257 258-export interface ExecaSyncError<StdOutErrType = string>258+export interface ExecaSyncError<StdoutErrorType = string>259 extends Error,260- ExecaReturnBase<StdOutErrType> {260+ ExecaReturnBase<StdoutErrorType> {261 /**262 The error message.263 */264 message: string;3 unmodified lines268 */269 code: number | string;270 }271 272-export interface ExecaError<StdOutErrType = string>273- extends ExecaSyncError<StdOutErrType> {272+export 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;278 279 /**280 Whether the process was canceled.281 */282 isCanceled: boolean;283 }284 285-export interface ExecaChildPromise<StdOutErrType> {285+export 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>;291 292 /**293 Cancel the subprocess.294 1 unmodified line296 */297 cancel(): void;298 }299 302-export type ExecaChildProcess<StdOutErrType = string> = ChildProcess &303- ExecaChildPromise<StdOutErrType> &304- Promise<ExecaReturnValue<StdOutErrType>>;300+export type ExecaChildProcess<StdoutErrorType = string> = ChildProcess &301+ ExecaChildPromise<StdoutErrorType> &302+ Promise<ExecaReturnValue<StdoutErrorType>>;303 304 declare const execa: {305 /**306 Execute a file.186 unmodified lines