import type { Messenger } from '../messenger/index.js'; import type { MessengerRawData } from './messenger.js'; import type { WorkerType } from '../constants/workers.js'; import type { PoolData } from './pool.js'; /** * The `workerData` which will be sent along in every single worker. */ export type BaseWorkerData = { type: Type; identifier: string; messengerTransfers: MessengerRawData[]; messengers: Record; pool: PoolData; }; /** * The `workerData` which will only be sent along for task workers. */ export type TaskWorkerData = { name: string; params: any[]; } & BaseWorkerData; /** * The `workerData` which will only be sent along for service workers. */ export type ServiceWorkerData = BaseWorkerData;