@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.
14 lines (13 loc) • 438 B
TypeScript
type AddOptions<TRecord> = {
newRecords: TRecord | Array<TRecord>;
index?: number;
records: Array<TRecord>;
};
/**
* @description
* Use this helper to add one or more records to the record set at the specified index.
*
* The insertion index is zero-based. If omitted or out of bounds, new records are appended at the end.
*/
export declare const add: <TRecord>(options: AddOptions<TRecord>) => Array<TRecord>;
export {};