/** * CLI argument parser. * * Pure function that parses process.argv-style string arrays into typed options. * * @module cli/args */ /** * Parsed CLI arguments. */ export type CliArgs = { notation: string | undefined; verbose: boolean; json: boolean; seed: string | undefined; showHelp: boolean; showVersion: boolean; }; /** * Result of parsing CLI arguments — either success or a usage error. The * failure arm carries `json` so a usage error renders in the format the * caller asked for; the success arm carries `terminated`, true only when a * `--` was consumed as the terminator rather than as a `--seed` value. */ export type ParseArgsResult = { ok: true; args: CliArgs; terminated: boolean; } | { ok: false; error: string; json: boolean; }; /** * True for an argument this parser accepts as a *valid* option outside a `--` * terminator — `--typo` is read as an option and rejected, and is not one here. */ export declare function isKnownOption(arg: string): boolean; /** * Parses a raw argument array into typed CLI options. * * @param argv - Arguments to parse (typically `process.argv.slice(2)`) * @returns Parsed result or an error message for usage errors */ export declare function parseArgs(argv: string[]): ParseArgsResult; //# sourceMappingURL=args.d.ts.map