Open berkes opened 2 years ago
Before, this raised an error for lint, test and basically any command:
TSError: ⨯ Unable to compile TypeScript:
src/signal-termination.ts:92:7 - error TS2322: Type 'true' is not assignable to type 'void'.
92 return process.kill(process.pid, signal)
Apparently process.kill() returns a Boolean, so the early return will return a true||false rather than the void as per the func sig.
This patch ensures we return void regardless of what process.kill() and process.exit() return. What they return may be dependent on node version and/or platform.