/** * errors.ts * --------- * Cross-cutting error types used by parsers, loaders, and config resolution. * Kept in its own module so feature modules can import error types without * pulling in unrelated implementation code (e.g., the JSON loader doesn't * need to depend on the CLI parser just to throw a typed error). */ /** * Thrown when user-supplied input is invalid: unknown CLI option, missing * value, non-positive number, malformed config file, unresolvable default * path, etc. Distinct from runtime errors so the top-level entry can exit * with code 2 (user error) instead of code 1 (runtime failure). */ export class CliError extends Error {}