interface DaemonState

The daemon's persistent, cross-run handles, lent to a single run via RunState.daemon.

// Defined, not invoked: only the daemon process (`qunitx daemon _serve`) owns a real one.
function warmHandles(handles: DaemonState) {
  return handles.pageSlot.page ?? handles.browser; // reuse the stashed page when there is one
}

Properties

browser: Browser

The daemon's Browser. run() reuses it instead of launching, and does not close it.

Persistent incremental-context slot, keeping the module graph warm across daemon runs.

pageSlot: { page: Page | null; }

Persistent Page slot, reused across runs to save a newPage() (~70-130ms). Read through RunState.reusablePageSlot(), never directly — reuse is only valid for single-group runs.

Usage

import { type DaemonState } from "lib/types.ts";