API reference › @evolu/common › local‑first/Evolu › createEvoluDeps
function createEvoluDeps(
deps: CreateDbWorkerDep &
CreateBroadcastChannelDep &
CreateMessageChannelDep &
DevicePersistenceDep &
LockManagerDep &
ReloadAppDep &
Partial<ConsoleDep> &
Partial<CreateMemoryInstanceWorkerDep> &
Partial<FlushSyncDep> &
Partial<RequestPersistentStorageDep> &
CreateStoredWorkerDep,
): EvoluDeps;
Defined in: packages/common/src/local-first/Evolu.ts:1831
Creates shared dependencies used by all createEvolu instances on a platform.
Call this once per platform and reuse the returned deps when creating multiple Evolu instances. The returned deps object owns long-lived resources such as worker channels and the shared EvoluErrorDep.evoluError and SyncStateDep.syncState stores. The sync state includes the stored worker and every private memory worker created through these deps. Where the platform provides CreateMemoryInstanceWorkerDep, as the web does, a memory instance owns and disposes its private worker; its errors and console entries reach only these deps.
It checks storage once and starts the stored worker as soon as the check answers, without waiting for an instance. Where storage is refused and memory instances have workers of their own, it never starts it, so such a browser tab takes no part in stored workers' build coordination.
Dispose it only during app shutdown.