RSIndexDiff
See source codeA type representing the diff of changes to a reactive store index. Maps property values to the collection differences for record IDs that have that property value.
type RSIndexDiff<
R extends UnknownRecord,
Property extends string & keyof R = string & keyof R,
> = Map<R[Property], CollectionDiff<IdOf<R>>>
Example
// For an index on book titles, the diff might look like:
const titleIndexDiff: RSIndexDiff<Book, 'title'> = new Map([
['The Lathe of Heaven', { added: new Set(['book:1']), removed: new Set() }],
['Animal Farm', { added: new Set(), removed: new Set(['book:2']) }],
])
Prev
RSIndexNext
RSIndexMap