Closed ghost closed 8 years ago
Can you provide a source for this information? process.exitCode
exists in v6.3.1 (latest version) and is not listed as deprecated in the documentation.
For normal usage this is working and not deprecated, but soon as you try to integrate Angular 2 or TypeScript this fails. In TypeScript ( Angular 2 is done with TS) you have to include various types. Default for node.js is node.d.ts
file. This file follows latest specs.
The file is here and updated 6 days ago. All process
related stuff is inlcuded except exitCode
.
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/node/node.d.ts
I opened an issue regarding this so we can see what they have to say about it: https://github.com/Microsoft/TypeScript/issues/9940
Seems like a bug in TypeScript. I'm definitely going to keep this in. Setting the exit code is pretty important for CI to know if the tests passed or not.
In never versions of NodeJS there is no
exitCode
onProcess
.Your code here will cause a bug: