@nx/module-federation
Version:
8 lines (7 loc) • 400 B
TypeScript
/**
* Check if a port is in use by attempting to bind to it. Binding is local and
* resolves immediately, so unlike a connection-based check it never stalls on
* the OS TCP connect timeout when `localhost` resolves to an unreachable address
* (e.g. IPv6 `::1`) -- the cause of the `nx serve` hang in #33909.
*/
export declare function isPortInUse(port: number, host?: string): Promise<boolean>;