1 | import type { BasicTarget } from '../utils/domTarget';
|
2 | type ItemHeight<T> = (index: number, data: T) => number;
|
3 | export interface Options<T> {
|
4 | containerTarget: BasicTarget;
|
5 | wrapperTarget: BasicTarget;
|
6 | itemHeight: number | ItemHeight<T>;
|
7 | overscan?: number;
|
8 | }
|
9 | declare const useVirtualList: <T = any>(list: T[], options: Options<T>) => readonly [{
|
10 | index: number;
|
11 | data: T;
|
12 | }[], (index: number) => void];
|
13 | export default useVirtualList;
|