Skip to main content
Module

x/effection/mod.ts>exit

Structured concurrency and effects for JavaScript
Latest
function exit
import { exit } from "https://deno.land/x/effection@3.0.3/mod.ts";

Halt process execution immediately and initiate shutdown. If a message is provided, it will be logged to the console after shutdown:

if (invalidArgs()) {
  yield* exit(5, "invalid arguments")
}

Parameters

status: number
  • the exit code to use for the process exit
optional
message: string
  • message to print to the console before exiting.