No overload matches this call. Type 'string' is not assignable to type 'Signals' : <p>I am using typescript to build a micro service and handling signals as well. The code was working fine till few days ago but recently it started throwing error. Couldn't find a fix for the issue. </p>

<p>code for handling signals. It is just part of the file.
<code>src/main.ts</code></p>

<pre><code>  enum signals {
    SIGHUP = 1,
    SIGINT = 2,
    SIGTERM = 15
  }
  const shutdown = (signal, value) =&gt; {
    logger.warn("shutdown!")
    Db.closeAll()
    process.exit(value)
  }
  Object.values(signals).forEach(signal =&gt; {
    process.on(signal, () =&gt; {
      logger.warn(`process received a ${signal} signal`)
      shutdown(signal, signals[signal])
    })
  })
</code></pre>

<p>When I do <code>ts-node src/main.ts</code> The following error throws and fails and exit.</p>

<pre><code>
/home/meraj/.nvm/versions/node/v8.10.0/lib/node_modules/ts-node/src/index.ts:245
    return new TSError(diagnosticText, diagnosticCodes)
           ^
TSError: ⨯ Unable to compile TypeScript:
src/main.ts:35:16 - error TS2769: No overload matches this call.
  The last overload gave the following error.
    Argument of type 'string | signals' is not assignable to parameter of type 'Signals'.
      Type 'string' is not assignable to type 'Signals'.

35     process.on(signal, () =&gt; {
                  ~~~~~~

  node_modules/@types/node/base.d.ts:653:9
    653         on(event: Signals, listener: SignalsListener): this;
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The last overload is declared here.

    at createTSError (/home/meraj/.nvm/versions/node/v8.10.0/lib/node_modules/ts-node/src/index.ts:245:12)
    at reportTSError (/home/meraj/.nvm/versions/node/v8.10.0/lib/node_modules/ts-node/src/index.ts:249:19)
    at getOutput (/home/meraj/.nvm/versions/node/v8.10.0/lib/node_modules/ts-node/src/index.ts:362:34)
    at Object.compile (/home/meraj/.nvm/versions/node/v8.10.0/lib/node_modules/ts-node/src/index.ts:395:32)
    at Module.m._compile (/home/meraj/.nvm/versions/node/v8.10.0/lib/node_modules/ts-node/src/index.ts:473:43)
    at Module._extensions..js (module.js:663:10)
    at Object.require.extensions.(anonymous function) [as .ts] (/home/meraj/.nvm/versions/node/v8.10.0/lib/node_modules/ts-node/src/index.ts:476:12)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
</code></pre>

<p>Any fix would be appreciated. Or If you can tell why it was working earlier just 2 days ago and not now. </p>
