mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
doc: deprecate coercion to integer in process.exit
This warns of invalid uses of process.exit([code]) and recommends the correct practice. Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com PR-URL: https://github.com/nodejs/node/pull/43738 Refs: https://github.com/nodejs/node/pull/43716 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
1 parent
d7cfd0c5ba
commit
d88a9fae79
1 file changed
+15
@@ -3155,6 +3155,20 @@ Use [`diagnostics_channel.subscribe(name, onMessage)`][] or
|
||||
[`diagnostics_channel.unsubscribe(name, onMessage)`][] which does the same
|
||||
thing instead.
|
||||
|
||||
### DEP0164: `process.exit([code])` coercion to integer
|
||||
|
||||
<!-- YAML
|
||||
changes:
|
||||
- version: REPLACEME
|
||||
pr-url: https://github.com/nodejs/node/pull/43738
|
||||
description: Documentation-only deprecation.
|
||||
-->
|
||||
|
||||
Type: Documentation-only
|
||||
|
||||
`code` values other than `undefined`, `null`, integer numbers and integer
|
||||
strings (e.g., '1') are deprecated as parameter in [`process.exit()`][].
|
||||
|
||||
[Legacy URL API]: url.md#legacy-url-api
|
||||
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
|
||||
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
|
||||
@@ -3233,6 +3247,7 @@ thing instead.
|
||||
[`os.networkInterfaces()`]: os.md#osnetworkinterfaces
|
||||
[`os.tmpdir()`]: os.md#ostmpdir
|
||||
[`process.env`]: process.md#processenv
|
||||
[`process.exit()`]: process.md#processexitcode
|
||||
[`process.getActiveResourcesInfo()`]: process.md#processgetactiveresourcesinfo
|
||||
[`process.mainModule`]: process.md#processmainmodule
|
||||
[`punycode`]: punycode.md
|
||||
|
||||
Reference in new issue
Block a user