Skip to content

CLIErrorOptions

Options accepted by the CLIError constructor.

Signatures

ts
interface CLIErrorOptions {}

Members

Properties

cause

Original error, if this wraps another.

ts
cause?: unknown;

code

Stable machine-readable identifier (e.g. "UNKNOWN_FLAG").

ts
code: ErrorCode;

details

Arbitrary structured payload (serialised in --json mode).

ts
details?: Readonly<Record<string, unknown>>;

exitCode

Process exit code.

ts
exitCode?: number;

suggest

One-liner actionable hint shown to the user.

ts
suggest?: string;

See Also

Released under the MIT License.