Skip to main content
Deno.exitCode - Deno documentation
variable Deno.exitCode

The exit code for the Deno process.

If no exit code has been supplied, then Deno will assume a return code of 0.

When setting an exit code value, a number or non-NaN string must be provided, otherwise a TypeError will be thrown.

console.log(Deno.exitCode); //-> 0
Deno.exitCode = 1;
console.log(Deno.exitCode); //-> 1

Type

number