Interface PaginatedOption<T, L, K>
interface PaginatedOption< T, L extends keyof LimitOptionAll = keyof LimitOptionAll, K = unknown,> { lastKey?: K; limit?: LimitFn<"total" | L, T>; onDone?: ( totalPage: number, key: undefined | K, data: T[], ) => undefined | boolean; onNextPage?: ( currentPage: number, key: undefined | K, data: T[], ) => unknown;} Properties
Optional
lastKey
Optional
limit
Optional
onDone
onDone?: ( totalPage: number, key: undefined | K, data: T[],) => undefined | boolean Type declaration
- (totalPage: number, key: undefined | K, data: T[]): undefined | boolean
Parameters
- totalPage: number
- key: undefined | K
- data: T[]
Returns undefined | boolean
false
: 将停止获取下一页
Optional
onNextPage
onNextPage?: (currentPage: number, key: undefined | K, data: T[]) => unknown Type declaration
- (currentPage: number, key: undefined | K, data: T[]): unknown
Parameters
- currentPage: number
- key: undefined | K
- data: T[]
Returns unknown
false
: 将停止获取下一页
上一页的 key