API reference@evolu/common › Worker

Typed, disposable worker and messaging primitives.

Functions

FunctionDescription
createSharedWorkerCreates an in-memory SharedWorker.
createWorkerCreates an in-memory Worker.
testCreateBroadcastChannelCreates an in-memory BroadcastChannel for testing.
testCreateMessageChannelCreates an in-memory MessageChannel for testing.
testCreateSharedWorkerCreates a connected TestSharedWorker for testing.
testCreateWorkerCreates a connected TestWorker for testing.
testWaitForWorkerMessageWaits until scheduled in-memory worker message delivery becomes idle.

Interfaces

InterfaceDescription
BroadcastChannelTyped, disposable BroadcastChannel.
CreateBroadcastChannelDep-
CreateMessageChannelDep-
CreateMessagePortDep-
MessageChannelTyped, disposable MessageChannel.
MessagePortTyped, disposable MessagePort.
SharedWorkerTyped, disposable SharedWorker.
SharedWorkerSelfTyped self for code running inside a shared worker.
TestBroadcastChannelBroadcastChannel with disposal tracking for testing.
TestMessageChannelMessageChannel with disposal tracking for testing.
TestSharedWorkerTest SharedWorker with direct access to self and connect.
TestWorkerTest Worker with access to its paired worker-side self.
WorkerTyped, disposable Worker.
WorkerSelfTyped self for code running inside a dedicated worker.

Type Aliases

Type AliasDescription
CreateBroadcastChannelFactory function to create a BroadcastChannel.
CreateMessageChannelFactory function to create a MessageChannel.
CreateMessagePortFactory function to create a MessagePort from a native port.
NativeMessagePortOpaque type for platform-specific native MessagePort.
TransferableObjects whose ownership can be transferred between threads via postMessage.
WorkerDepsCommon dependencies for worker entry points.

Variables

VariableDescription
createBroadcastChannelCreates an in-memory BroadcastChannel.
createMessageChannelCreates an in-memory MessageChannel.
createMessagePortCreates an in-memory MessagePort from a native token.
testCreateMessagePortCreates an in-memory CreateMessagePort for testing.