Skip to content

RegistryComponentOptions

Defined in: src/component-store.ts:461

Options for a registry-backed component: how to (de)serialize a looked-up value by its registry id — lookup/selectId bridge value ↔ id, and idKey/idKind/valueKey name the serialized fields.

TValue

TId extends number | string

TValueKey extends string = "def"

readonly optional idKey?: string

Defined in: src/component-store.ts:467

Serialized id field name. Defaults to id.


readonly optional idKind?: RegistryIdKind

Defined in: src/component-store.ts:469

Serialized id primitive kind. Defaults to string.


readonly lookup: (id) => TValue | undefined

Defined in: src/component-store.ts:473

Lookup function used during deserialize. Returns undefined for unknown ids.

TId

TValue | undefined


readonly optional migrations?: Readonly<Record<number, ComponentMigration>>

Defined in: src/component-store.ts:443

SimpleComponentOptions.migrations


readonly optional requires?: readonly string[]

Defined in: src/component-store.ts:444

SimpleComponentOptions.requires


readonly selectId: (value) => TId

Defined in: src/component-store.ts:475

Selects the registry id from the stored value during serialize.

TValue

TId


readonly optional valueKey?: TValueKey

Defined in: src/component-store.ts:471

Component field name that holds the looked-up value. Defaults to def.


readonly optional version?: number

Defined in: src/component-store.ts:445

SimpleComponentOptions.version