function startPrelaunch
startPrelaunch(): void

Starts Chrome now, if this invocation is one that will need it.

Call it as early as possible and exactly once: the whole benefit is the overlap with the module loading that follows, and a second call is a no-op rather than a second browser. The decision reads process.argv directly rather than going through the shared tokenizer — this runs at ~t=5ms and stays free of avoidable imports.

import { startPrelaunch } from './prelaunch.ts';

// Defined, not invoked: spawns a real Chrome process.
function begin() {
  startPrelaunch(); // resolves through prelaunchPromise() once CDP is ready
}

Return Type

void

Usage

import { startPrelaunch } from "lib/chrome/prelaunch.ts";