mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
Deno.exit() is an alias to self.close() in worker contexts (#14826)
This commit changes Deno.exit() to be an alias to self.close() in worker contexts, and the provided exit code becomes is ignored.
This commit is contained in:
parent
4a0a412d7c
commit
fc3a966a2d
11 changed files with 66 additions and 47 deletions
2
cli/dts/lib.deno.ns.d.ts
vendored
2
cli/dts/lib.deno.ns.d.ts
vendored
|
@ -480,6 +480,8 @@ declare namespace Deno {
|
|||
/** Exit the Deno process with optional exit code. If no exit code is supplied
|
||||
* then Deno will exit with return code of 0.
|
||||
*
|
||||
* In worker contexts this is an alias to `self.close();`.
|
||||
*
|
||||
* ```ts
|
||||
* Deno.exit(5);
|
||||
* ```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue