NodeRuntime.ts
NodeRuntime.ts overview
Section titled “NodeRuntime.ts overview”Node-compatible process runner for Effect programs.
This module provides the shared runMain implementation used by
Node-compatible platform packages. It runs one Effect as the main process
fiber, interrupts that fiber on SIGINT or SIGTERM, and delegates final
exit-code handling to the configured teardown.
Since v4.0.0
Exports Grouped by Category
Section titled “Exports Grouped by Category”running
Section titled “running”runMain
Section titled “runMain”Runs an Effect as the Node process main program, interrupting the fiber on
SIGINT or SIGTERM and invoking the configured teardown to determine the
process exit code.
Signature
declare const runMain: { (options?: { readonly disableErrorReporting?: boolean | undefined readonly teardown?: Runtime.Teardown | undefined }): <E, A>(effect: Effect<A, E>) => void <E, A>( effect: Effect<A, E>, options?: { readonly disableErrorReporting?: boolean | undefined; readonly teardown?: Runtime.Teardown | undefined } ): void}Since v4.0.0