Skip to content

ParseErrorOptions ​

Options for ParseError. Code is narrowed to parse-specific codes.

Signatures ​

ts
interface ParseErrorOptions extends Omit<CLIErrorOptions, "code" | "exitCode"> {}

Members ​

Properties ​

cause ​

Original error, if this wraps another.

ts
cause?: unknown;

code ​

Parse-category error code (e.g. 'UNKNOWN_FLAG', 'MISSING_VALUE').

ts
code: ParseErrorCode;

details ​

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

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

exitCode ​

Process exit code for parse failures.

ts
exitCode?: number;

suggest ​

One-liner actionable hint shown to the user.

ts
suggest?: string;

See Also ​

Released under the MIT License.