UNPKG

portfree

Version:

A cross-platform CLI tool for managing processes running on specific ports

31 lines 899 B
/** * Validation utilities for the FreePort CLI */ /** * Validate port number * @param port - Port value to validate * @returns Valid port number * @throws If port is invalid */ export declare function validatePort(port: unknown): number; /** * Validate process ID * @param pid - Process ID to validate * @returns Valid process ID * @throws If PID is invalid */ export declare function validatePid(pid: unknown): number; /** * Validate protocol * @param protocol - Protocol to validate * @returns Valid protocol * @throws If protocol is invalid */ export declare function validateProtocol(protocol: string): 'TCP' | 'UDP'; /** * Validate user input for yes/no questions * @param input - User input to validate * @returns True for yes, false for no, null for invalid */ export declare function validateYesNo(input: string): boolean | null; //# sourceMappingURL=validator.d.ts.map