UNPKG

407 BTypeScriptView Raw
1type DetectPortCallback = (err: Error, _port: number) => void;
2
3interface PortConfig {
4 port?: number;
5 hostname?: string | undefined;
6 callback?: DetectPortCallback | undefined;
7}
8
9interface DetectPort {
10 (port: number | PortConfig | undefined, callback: DetectPortCallback): void;
11 (port?: number | PortConfig): Promise<number>;
12}
13declare const detectPort: DetectPort;
14export = detectPort;