Skip to content

OpfsEffectsDeps

Defined in: packages/client/src/opfs-effects.ts:31

The injectable seam so Bun unit tests fake the OPFS root (there is no real OPFS there).

optional getRoot?: () => Promise<DirLike>

Defined in: packages/client/src/opfs-effects.ts:37

The OPFS root getter. Omit in production: the default reads navigator.storage.getDirectory off globalThis (structural, no DOM lib). Absent API → the delete effects are no-ops, observe is "unobservable", and the create effects throw (they are only reached in the opfs engine home).

Promise<DirLike>


optional locks?: OwnershipLocks | null

Defined in: packages/client/src/opfs-effects.ts:42

The Web Locks surface deleteStoreDirectory orders on (store-ownership-lock.ts). Omit in production: the default reads navigator.locks off globalThis; null (or an absent API) skips the ordering.


optional ownershipWaitMs?: number

Defined in: packages/client/src/opfs-effects.ts:44

Bound on waiting for the store’s owner to release before deleteStoreDirectory fails. Default 10 s.