Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/tsc/dts/lib.deno.ns.d.ts>Deno.exitCode

A modern runtime for JavaScript and TypeScript.
Latest
variable Deno.exitCode
import { Deno } from "https://deno.land/x/deno@v2.0.4/cli/tsc/dts/lib.deno.ns.d.ts";
const { exitCode } = Deno;

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