UNPKG

596 BTypeScriptView Raw
1export type DetectPortCallback = (err: Error | null, port?: number) => void;
2export interface PortConfig {
3 port?: number | string;
4 hostname?: string | undefined;
5 callback?: DetectPortCallback;
6}
7export declare class IPAddressNotAvailableError extends Error {
8 constructor(options?: ErrorOptions);
9}
10export declare function detectPort(port?: number | PortConfig | string): Promise<number>;
11export declare function detectPort(callback: DetectPortCallback): void;
12export declare function detectPort(port: number | PortConfig | string | undefined, callback: DetectPortCallback): void;