API reference › @evolu/common › local‑first/Shared › CreateMemoryInstanceWorkerDep

Defined in: packages/common/src/local-first/Shared.ts:734

Creates a worker owned by one memory instance on platforms where another tab could otherwise host its database. In-process platforms need no factory.

Each call creates a new worker running initSharedWorker in "memory-instance" mode. createEvolu disposes it with its instance. The worker reports console entries and errors on its own worker-ID channel and sends instance-specific and uncaught errors on its own port. A thrown error becomes the deps' EvoluErrorDep.evoluError, and the instance starts with a worker that drops every message.

Properties

createMemoryInstanceWorker

readonly createMemoryInstanceWorker: () => SharedWorker;

Defined in: packages/common/src/local-first/Shared.ts:735