CreateListOptions
Defined in: state/factories.ts:331
Type Parameters
Section titled “Type Parameters”T
Properties
Section titled “Properties”default?
Section titled “default?”
optionaldefault?:Iterable<T,any,any> | (() =>Iterable<T>)
Defined in: state/factories.ts:332
keyBy?
Section titled “keyBy?”
optionalkeyBy?: (item) =>ListKey
Defined in: state/factories.ts:343
Derive a domain key from each item to enable O(1) keyed lookup via
findId / getByKey / upsert. Without it those methods throw. The key
field may change via update; the index reindexes on every mutation.
Keys are unique: a keyed list holds at most one item per derived key.
add, update, and upsert throw if the operation would leave two live
items sharing a key. This keeps the key→id index unambiguous — every key
resolves to exactly one item.
Parameters
Section titled “Parameters”T