import { type ChildProcess, type StdioOptions } from "child_process"; import { type Worker } from "cluster"; import { type Socket } from "net"; export interface SpawnedServer { port: number; close(): Promise | void; } export declare function parseEnv(envFile: string): Promise; export declare function loadEnv(envFile: string): void; export declare function spawnServer(cmd: string, args?: string[], port?: number, env?: string | Record, cwd?: string, wait?: number, stdio?: StdioOptions): Promise; export declare function spawnServerWorker(module: string, args?: string[], port?: number, env?: string | Record, wait?: boolean): Promise; export declare function waitForError(proc: ChildProcess, port: number): Promise; export declare function waitForServer(port: number, wait?: number): Promise; export declare function waitForWorker(worker: Worker, port: number): Promise; export declare function getConnection(port: number): Promise; export declare function isPortInUse(port: number): Promise; export declare function getAvailablePort(port?: number): Promise; export declare function getInspectOptions(args: string[]): { host: string | undefined; port: number | undefined; wait: boolean | undefined; } | undefined;