UNPKG

z-ipc

Version:

Z-IPC is an easy-to-use, extensible and fully type-safe IPC solution for JavaScript environments.

14 lines (11 loc) 489 B
import { A as Adapter } from '../adapter-6ny_hedX.cjs'; 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 };