Skip to content

ExitCode

ExitCode = number & object

Defined in: packages/core/src/kernel/types.ts:95

Exit code returned by a bin. 0 = success, non-zero = failure, 128 + N = killed by signal N.

readonly __brand: "ExitCode"

Branded so return 1 in a bin is a compile error — the boundary is return exitCode(1), which surfaces intent and prevents a file size or byte count being accidentally returned as the process result.

import { exitCode, type BinFunction } from '@fishnet/core'
const ok: BinFunction = async () => exitCode(0)

exitCode