import { record } from '@synnaxlabs/x'; import { FrameProps } from './Frame'; interface GetItem = record.Keyed> { (key?: K): E | undefined; (key: K[]): E[]; } /** Return value for {@link useMapData}. */ export interface UseMapDataReturn = record.Keyed> extends Required, "subscribe">> { /** Adds or replaces items, re-rendering only the rows that carry their keys. */ setItem: (item: E | E[]) => void; deleteItem: (key: K | K[]) => void; hasItem: (key: K) => boolean; getItem: GetItem; } export interface UseMapDataProps = record.Keyed> { initialData?: E[]; } /** * Holds list entries in a ref-backed map and notifies only the rows whose keys change. * Use it when entries update often and a re-render of the whole list would be too * expensive. It owns the entries, not their order: pass `data` to the frame yourself. */ export declare const useMapData: = record.Keyed>({ initialData }?: UseMapDataProps) => UseMapDataReturn; export {}; //# sourceMappingURL=useMapData.d.ts.map