Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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