@oxog/port-terminator
Version:
Cross-platform utility to terminate processes on ports with zero dependencies
31 lines • 1.17 kB
TypeScript
export declare class PortTerminatorError extends Error {
readonly code: string;
readonly port?: number;
readonly pid?: number;
constructor(message: string, code: string, port?: number, pid?: number);
}
export declare class ProcessNotFoundError extends PortTerminatorError {
constructor(port: number);
}
export declare class PermissionError extends PortTerminatorError {
constructor(message: string, pid?: number);
}
export declare class PlatformError extends PortTerminatorError {
constructor(platform: string, message?: string);
}
export declare class TimeoutError extends PortTerminatorError {
constructor(operation: string, timeout: number);
}
export declare class InvalidPortError extends PortTerminatorError {
constructor(port: number | string);
}
export declare class CommandExecutionError extends PortTerminatorError {
readonly command: string;
readonly exitCode: number;
readonly stderr: string;
constructor(command: string, exitCode: number, stderr: string);
}
export declare class ProcessKillError extends PortTerminatorError {
constructor(pid: number, signal?: string);
}
//# sourceMappingURL=index.d.ts.map