z-ipc
Version:
Z-IPC is an easy-to-use, extensible and fully type-safe IPC solution for JavaScript environments.
14 lines (11 loc) • 488 B
TypeScript
import { A as Adapter } from '../adapter-6ny_hedX.js';
import { Worker } from 'node:worker_threads';
/**
* Create an adapter that allows to communicate with child workers.
*/
declare function createWorkerThreadAdapter<TMessage>(worker: Worker): Adapter<TMessage>;
/**
* Create an adapter that allows to communicate with the parent thread.
*/
declare function createParentThreadAdapter<TMessage>(): Adapter<TMessage>;
export { createParentThreadAdapter, createWorkerThreadAdapter };