Potentially outdated documentation
You're reading API reference for version 3.0.3. The latest stable release is version 3.1.0.
function exitthefrontside/effection
function* exit(status: number, message?: string): Operation<void>
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
messageoptional: string
- message to print to the console before exiting.
Return Type
Operation<void>