Function: fromWorker()
fromWorker<
TIn,TOut>(worker): (payload,ctx) =>AsyncGenerator<TOut,void,void>
Defined in: worker-stream.ts:30
Typed compute factory: the ergonomic way to point a cell at a worker — cell(params, fromWorker<In, Out>(worker)) — with full type inference. The worker is passed as an accessor so a durable (HMR-adopted) instance can be resolved lazily.
Type Parameters
TIn
TIn
TOut
TOut
Parameters
worker
Worker | (() => Worker)
Returns
(payload, ctx) => AsyncGenerator<TOut, void, void>