Skip to content

Commit

Permalink
Fix type of forceKillAfterDelay option (#1116)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky authored Jun 4, 2024
1 parent 97f0e01 commit 4f64270
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions test-d/arguments/options.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ expectError(execaSync('unicorns', {killSignal: 'SIGRT1'}));

await execa('unicorns', {forceKillAfterDelay: false});
expectError(execaSync('unicorns', {forceKillAfterDelay: false}));
await execa('unicorns', {forceKillAfterDelay: true});
expectError(execaSync('unicorns', {forceKillAfterDelay: true}));
await execa('unicorns', {forceKillAfterDelay: false as boolean});
expectError(execaSync('unicorns', {forceKillAfterDelay: false as boolean}));
await execa('unicorns', {forceKillAfterDelay: 42});
expectError(execaSync('unicorns', {forceKillAfterDelay: 42}));
expectError(await execa('unicorns', {forceKillAfterDelay: 'true'}));
Expand Down
2 changes: 1 addition & 1 deletion types/arguments/options.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ export type CommonOptions<IsSync extends boolean = boolean> = {
@default 5000
*/
readonly forceKillAfterDelay?: Unless<IsSync, number | false>;
readonly forceKillAfterDelay?: Unless<IsSync, number | boolean>;

/**
Default [signal](https://en.wikipedia.org/wiki/Signal_(IPC)) used to terminate the subprocess.
Expand Down

0 comments on commit 4f64270

Please sign in to comment.