@future-widget-lab/record-set
Version:
A dedicated data structure for in-memory record collections, offering fluent, immutable APIs for MongoDB-like querying, sorting, and transformation.
15 lines (14 loc) • 476 B
TypeScript
import type { Query } from 'sift';
type UpdateOptions<TRecord> = {
changes: Partial<TRecord>;
query: Query<TRecord>;
records: Array<TRecord>;
};
/**
* @description
* Use this helper to update records in the record set matching the sift query by merging the provided update object.
*
* Performs a shallow merge of the update object into matching records.
*/
export declare const update: <TRecord>(options: UpdateOptions<TRecord>) => Array<TRecord>;
export {};