import type { ExecutorToWorkerMessageCatalog, WorkerToExecutorMessageCatalog } from "./schemas/messages.js"; import type { inferZodSchemaInput, inferZodSchemaOutput } from "./types/schemas.js"; import type { GetSocketCallbackSchema, GetSocketMessageSchema, GetSocketMessagesWithCallback, GetSocketMessagesWithoutCallback, SocketMessageHasCallback, ZodSocketMessageCatalogSchema } from "./zodSocket.js"; interface ZodIpcMessageSender { send>(type: K, payload: inferZodSchemaInput>): Promise; sendWithAck>(type: K, payload: inferZodSchemaInput>): Promise>>; } type ZodIpcMessageHandlers = Partial<{ [K in keyof TListenCatalog]: (payload: inferZodSchemaOutput>, sender: ZodIpcMessageSender) => Promise extends true ? inferZodSchemaInput> : void>; }>; interface ZodIpcConnectionOptions { listenSchema: TListenCatalog; emitSchema: TEmitCatalog; process: { send?: (message: any) => any; on?: (event: "message", listener: (message: any) => void) => void; connected?: boolean; }; handlers?: ZodIpcMessageHandlers; } export declare class ZodIpcConnection { #private; private opts; constructor(opts: ZodIpcConnectionOptions); connect(): Promise; send>(type: K, payload: inferZodSchemaInput>): Promise; sendWithAck>(type: K, payload: inferZodSchemaInput>, timeoutInMs?: number): Promise>>; } export type WorkerToExecutorProcessConnection = ZodIpcConnection; export type ExecutorToWorkerProcessConnection = ZodIpcConnection; export {};