import { ChildProcess, ForkOptions } from 'child_process'; import { SerializableInput, Serializable } from '../types'; export interface ChildProcessOptions extends ForkOptions { /** Data to send to the cluster. */ clusterData?: NodeJS.ProcessEnv | undefined; /** The arguments to pass to the child process. */ args?: string[] | undefined; } export declare class Child { private file; /** The child process. */ process: ChildProcess | null; /** The options for the child process. */ processOptions: ForkOptions & { args?: string[]; }; /** Type-safe listener manager */ private _listeners; /** Creates an instance of Child. */ constructor(file: string, options: ChildProcessOptions); /** Spawns the child process. */ spawn(): ChildProcess; /** Respawns the child process. */ respawn(): Promise; /** Kills the child process with proper cleanup. */ kill(): Promise; /** Clean up process and listeners */ private _cleanup; /** Sends a message to the child process. */ send(message: SerializableInput): Promise; } /** Child client class. */ export declare class ChildClient { /** The IPC process. */ readonly ipc: NodeJS.Process; /** Creates an instance of ChildClient. */ constructor(); /** Sends a message to the child process. */ send(message: SerializableInput): Promise; }