useHeights.d.ts 369 B

12345678
  1. import type { GetKey } from '../interface';
  2. import CacheMap from '../utils/CacheMap';
  3. export default function useHeights<T>(getKey: GetKey<T>, onItemAdd?: (item: T) => void, onItemRemove?: (item: T) => void): [
  4. setInstanceRef: (item: T, instance: HTMLElement) => void,
  5. collectHeight: (sync?: boolean) => void,
  6. cacheMap: CacheMap,
  7. updatedMark: number
  8. ];