npm install --save @types/detect-port
This package contains type definitions for detect-port (https://github.com/node-modules/detect-port).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/detect-port.
type DetectPortCallback = (err: Error, _port: number) => void;
interface PortConfig {
port?: number;
hostname?: string | undefined;
callback?: DetectPortCallback | undefined;
}
interface DetectPort {
(port: number | PortConfig | undefined, callback: DetectPortCallback): void;
(port?: number | PortConfig): Promise<number>;
}
declare const detectPort: DetectPort;
export = detectPort;
- Last updated: Mon, 06 Nov 2023 22:41:05 GMT
- Dependencies: none
These definitions were written by Ivan Medina.