Skip to content

Commit

Permalink
Change documentation of .cancel() to mention that it’s deprecated (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
leafac authored Dec 8, 2022
1 parent 7a8f5cd commit e851c61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ export interface ExecaChildPromise<StdoutErrorType> {
kill(signal?: string, options?: KillOptions): void;

/**
Similar to [`childProcess.kill()`](https://nodejs.org/api/child_process.html#child_process_subprocess_kill_signal). This is preferred when cancelling the child process execution as the error is more descriptive and [`childProcessResult.isCanceled`](#iscanceled) is set to `true`.
Similar to [`childProcess.kill()`](https://nodejs.org/api/child_process.html#child_process_subprocess_kill_signal). This used to be preferred when cancelling the child process execution as the error is more descriptive and [`childProcessResult.isCanceled`](#iscanceled) is set to `true`. But now this is deprecated and you should either use `.kill()` or the `signal` option when creating the child process.
*/
cancel(): void;
}
Expand Down

0 comments on commit e851c61

Please sign in to comment.