From 5aabbfb187d4bc9fdaf6bc77a62a9c4f4c7d36a1 Mon Sep 17 00:00:00 2001 From: Will Bjorn <30843002+wibjorn@users.noreply.github.com> Date: Wed, 28 Oct 2020 14:40:20 -0700 Subject: [PATCH] Fix typo in index.d.ts (#441) Co-authored-by: Sindre Sorhus --- index.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 8e1050a94a..fbf199aa8c 100644 --- a/index.d.ts +++ b/index.d.ts @@ -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) {