Skip to content

assertStorageDeclarationCompatible

assertStorageDeclarationCompatible(bound, incoming): void

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

Check a LATER declaration against a store’s bound resolution (ADR-0050): an unset or equal field is idempotent; an explicit field disagreeing with the bound value is a StorageDeclarationRefusedError. The bound declaration is immutable — first arrival binds, later arrivals only confirm.

engine is checked on its module URL, and only when the incoming declaration names one: an incoming declaration with NO engine is “no opinion” exactly like an unset backend, never an assertion that the store is on the built-in engine. (Absence is how the built-in engine is spelled, so it cannot double as an explicit contradiction; a consumer switching back mints a fresh store rather than redeclaring one.)

ResolvedStorageDeclaration

SyncStorageDeclaration | undefined

void