variable InvalidOption

An option was given a value the runner will not accept.

The API's equivalent of InvalidFlag, and it exists for the same reason: the values that come from outside — an enum spelled wrong, a port out of range — must be rejected where they are named, not several layers down as an unexplained browser-launch failure.

const failure = InvalidOption({ option: 'browser', value: 'netscape', expected: 'chromium, firefox, webkit' });
failure.data.option; // 'browser' — typed payload, no message parsing

Type

Failure.FailureFactory<
"InvalidOption",
{ option: string; value: unknown; expected: string; }
>

Usage

import { InvalidOption } from "lib/api/options.ts";