/** * react-fetch v1.49.0 * * Copyright (c) resourge. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */ import { type FilterParamsReturn } from '../types/FilterParamsTypes'; import { type PaginationConfig } from '../types/PaginationConfig'; import { type PaginationFunctionsType, type PaginationMethod } from '../types/PaginationFunctionsType'; export type InfiniteLoadingReturn = Record> = FilterParamsReturn & PaginationFunctionsType & { /** * If can load more pages */ canLoadMore: boolean; readonly context: InfiniteLoadingReturn; /** * If is last "page" */ isLast: boolean; loadMore: () => Promise; /** * Preload method. */ preload: () => void; }; export declare const useInfiniteLoading: = Record>(method: PaginationMethod, { deps, enable, fId, filter: defaultFilter, hash, initialPage, initialPerPage, initialState, paramsMode, preload, scrollRestoration, sort: defaultSort, ...config }: PaginationConfig) => InfiniteLoadingReturn;