/** * Thread-Safe Port Allocator for Test Environments * Prevents port conflicts during parallel test execution with race condition protection */ import { EventEmitter } from 'events'; interface PortAllocatorOptions { basePort?: number; maxPort?: number; cleanupIntervalMs?: number; allocationTimeoutMs?: number; } export declare class PortAllocator extends EventEmitter { private static instance; private readonly basePort; private readonly maxPort; private readonly allocationFile; private readonly cleanupIntervalMs; private readonly allocationTimeoutMs; private allocatedPorts; cleanupTimer?: NodeJS.Timeout; private cleanupInProgress; private constructor(); static getInstance(options?: PortAllocatorOptions): PortAllocator; allocatePort(testFile?: string): Promise; releasePort(port: number): Promise; releaseAllPorts(): Promise; private isPortAvailable; private loadAllocations; private saveAllocations; private cleanupStaleAllocations; private startCleanupTimer; destroy(): Promise; } export declare function allocatePort(testFile?: string): Promise; export declare function releasePort(port: number): Promise; export declare function releaseAllPorts(): Promise; export declare function cleanupPortAllocator(): Promise; export declare const portAllocator: PortAllocator; export default PortAllocator; //# sourceMappingURL=portAllocator.d.ts.map