Skip to content

Pid

Pid = number & object

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

Process identifier. Monotonically increasing, never reused within a session.

readonly __brand: "Pid"

Branded instead of bare number so that a raw 42 cannot be passed where the kernel expects a PID — catches ordering bugs at compile time (e.g. swapping arguments to kill(pid, signal)).

import { pid } from '@fishnet/core'
const p = pid(42) // Pid

pid