Skip to content

Commit

Permalink
Fix typo in index.d.ts (#441)
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
  • Loading branch information
wibjorn and sindresorhus committed Oct 28, 2020
1 parent cae090f commit 5aabbfb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion index.d.ts
Expand Up @@ -432,9 +432,15 @@ declare const execa: {
console.log(stdout);
//=> 'unicorns'
// Cancelling a spawned process
const subprocess = execa('node');
setTimeout(() => { spawned.cancel() }, 1000);
setTimeout(() => {
subprocess.cancel()
}, 1000);
try {
await subprocess;
} catch (error) {
Expand Down

0 comments on commit 5aabbfb

Please sign in to comment.