Newer version available
You’re viewing the API reference for version 3.0.3, but the latest version is 3.1.0. The latest version include may important updates and fixes.
View Latest Versionfunction exit
thefrontside/effectionfunction* 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>