Skip to content

isStorageEngineModule

isStorageEngineModule(value): value is string

Defined in: packages/contracts/src/config.ts:186

Type guard: is value a usable StorageEngineDeclaration.module — a non-blank string that parses as an ABSOLUTE URL (https://…/factory.js) or an ORIGIN-RELATIVE one (/store-engine/factory.js)?

A document-relative specifier (./factory.js, factory.js) is deliberately rejected: the declaration crosses a bridge into a worker scope whose base URL is the worker chunk’s, not the tab’s, so a relative URL would resolve differently on either side of the wire. Source of truth for SyncStorageDeclaration validation.

unknown

value is string