NodeRuntime
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.
Running
Signature
declare const runMain: {
(options?: {
readonly disableErrorReporting?: boolean;
readonly teardown?: Runtime.Teardown;
}): <E, A>(effect: Effect<A, E>) => void;
<E, A>(
effect: Effect<A, E>,
options?: {
readonly disableErrorReporting?: boolean;
readonly teardown?: Runtime.Teardown;
},
): void;
};
Runs an Effect as the Node process main program, interrupting the fiber on
SIGINTorSIGTERMand invoking the configured teardown to determine the process exit code.