1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00
denoland-deno/runtime/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
..
01_errors.js chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
01_version.ts refactor: use core.ensureFastOps() (#21888) 2024-01-10 15:37:25 -07:00
06_util.js refactor: use web utils and lazy load utils from core (#22289) 2024-02-06 22:28:32 +01:00
10_permissions.js fix(runtime): use more null proto objects (#23921) 2024-05-23 00:03:35 +02:00
11_workers.js fix(runtime): use more null proto objects (#23921) 2024-05-23 00:03:35 +02:00
13_buffer.js chore: update references to deno_std to use JSR (#23239) 2024-04-10 17:26:35 -04:00
30_os.js feat: Add Deno.exitCode API (#23609) 2024-05-29 23:16:27 +00:00
40_fs_events.js FUTURE(ext/fs): remove Deno.FsWatcher.prototype.rid (#23234) 2024-04-07 17:46:39 +10:00
40_process.js fix(runtime): use more null proto objects (#23921) 2024-05-23 00:03:35 +02:00
40_signals.js fix(runtime): use more null proto objects (#23921) 2024-05-23 00:03:35 +02:00
40_tty.js chore: upgrade deno_core (#22725) 2024-03-06 15:08:10 -08:00
41_prompt.js refactor: migrate extensions to virtual ops module (#22135) 2024-01-26 23:46:46 +01:00
90_deno_ns.js fix(runtime): use more null proto objects (#23921) 2024-05-23 00:03:35 +02:00
98_global_scope_shared.js fix(runtime): use more null proto objects (#23921) 2024-05-23 00:03:35 +02:00
98_global_scope_window.js refactor: use web utils and lazy load utils from core (#22289) 2024-02-06 22:28:32 +01:00
98_global_scope_worker.js refactor: use web utils and lazy load utils from core (#22289) 2024-02-06 22:28:32 +01:00
99_main.js feat: Add Deno.exitCode API (#23609) 2024-05-29 23:16:27 +00:00
README.md chore: fix outdated note in runtime/js/README.md (#23673) 2024-05-05 01:30:53 +00:00

Runtime JavaScript Code

This directory contains Deno runtime code written in plain JavaScript.

Each file is an ES module and is prefixed with a number, telling in which order scripts should be loaded into V8 isolate.

Deno Web APIs

This directory facilities Web APIs that are available in Deno.

Please note, that some implementations might not be completely aligned with specification.

Some Web APIs are using ops under the hood, eg. console, performance.

Implemented Web APIs