export declare class InvalidPortError extends Error { } /** * Parse the `--port` argument from a CLI argv slice (i.e. `process.argv.slice(2)`). * * Pure: does not read `process.argv`, never calls `process.exit` or `console.error`. * Supports both `--port ` (space form, checked first) and `--port=`. * * @returns the parsed port, or `null` when `--port` is absent. * @throws {InvalidPortError} when the value is missing or out of range (integer 1–65535). */ export declare function parsePortArg(args: string[]): number | null;