1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-24 08:09:08 -05:00
denoland-deno/cli/js
Luke Edwards 13723f267e
feat: Add Deno.exitCode API (#23609)
This commits adds the ability to set a would-be exit code 
for the Deno process without forcing an immediate exit, 
through the new `Deno.exitCode` API.

- **Implements `Deno.exitCode` getter and setter**: Adds support for
setting
and retrieving a would-be exit code via `Deno.exitCode`.
This allows for asynchronous cleanup before process termination 
without immediately exiting.
- **Ensures type safety**: The setter for `Deno.exitCode` validates that
the provided value is a number, throwing a TypeError if not, to ensure
that
only valid exit codes are set.

Closes to #23605

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-05-29 23:16:27 +00:00
..
40_bench.js fix: don't panic in test and bench if ops not available (#23055) 2024-03-24 16:16:45 -07:00
40_jupyter.js fix(runtime): use more null proto objects (#23921) 2024-05-23 00:03:35 +02:00
40_test.js feat: Add Deno.exitCode API (#23609) 2024-05-29 23:16:27 +00:00
40_test_common.js chore(cli): split 40_testing (#22112) 2024-01-25 14:54:35 -05:00