RegistryInvariantSpec
Defined in: packages/contracts/src/registry-invariant.ts:65
Properties
Section titled “Properties”appliesTo
Section titled “appliesTo”appliesTo: readonly
string[] | ((entry,key) =>boolean)
Defined in: packages/contracts/src/registry-invariant.ts:74
Which entries the invariant binds: a list of SyncTableEntry.rowClass values (the normal form —
coverage then grows with the registry), or a predicate over the entry for the rare case a class cannot
express. When the registry declares its rowClasses, a class named here that is not in that vocabulary
throws immediately — a typo would otherwise bind nothing and pass vacuously.
claimsFixtures
Section titled “claimsFixtures”claimsFixtures:
Record<string,JwtClaims>
Defined in: packages/contracts/src/registry-invariant.ts:79
The claims personas the invariant is evaluated against, by name ({ anonymous: {}, owner: {...} }). Every
bound entry is checked against every fixture; the names appear in the failure report.
holds: (
cell) =>string|boolean
Defined in: packages/contracts/src/registry-invariant.ts:85
The invariant itself, over ONE (entry × fixture) cell’s rendered artifacts. Return true when it holds,
false or a reason string when it does not — a reason string is reproduced verbatim in the error, so
prefer it.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”string | boolean
name:
string
Defined in: packages/contracts/src/registry-invariant.ts:67
Human name for the invariant, used as the error header (e.g. “private rows never leave their owner”).