mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-06 08:23:19 +08:00
Document process.exitCode reads on the limitations page
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
297ec38f07
commit
72eab2aa0e
@@ -1,3 +1,4 @@
|
||||
- **Exit status:** Numeric `process.exitCode = value` writes in statement position set the implicit exit status, which `process.exit()` uses when called without an argument.
|
||||
`process.exit(code)` and `process.exitCode` throw a `RangeError` (`ERR_OUT_OF_RANGE`) for a code that is not a safe integer, and convert other codes to int32, as Node does.
|
||||
Reads, resets, and assignments used as values are unsupported.
|
||||
Reading `process.exitCode` answers the assigned code, or `undefined` before any assignment; `process.exit(code)` assigns it before the `'exit'` listeners run.
|
||||
Resets (`process.exitCode = undefined`) and assignments used as values are unsupported.
|
||||
|
||||
Reference in New Issue
Block a user