WorkerNode
constWorkerNode:object
Defined in: src/worker/WorkerNode.ts:37
Worker-side helper. Call await WorkerNode.join() from inside an
async function (async function main() { … } main();), NOT as a
top-level await. In Bun, top-level await inside a worker suspends
the module loader in a way that prevents incoming messages from
dispatching to self.onmessage, and the handshake hangs forever.
Type Declaration
Section titled “Type Declaration”join()
Section titled “join()”join<
TInit>():Promise<WorkerNodeContext<TInit>>
Type Parameters
Section titled “Type Parameters”TInit = unknown
Returns
Section titled “Returns”Promise<WorkerNodeContext<TInit>>