Repository URL to install this package:
Version:
0.2.0-dev.38 ▾
|
import { Fetcher, SWRConfiguration } from 'swr';
import { IUseApiResults } from './index.types';
export declare function getUseApiFunction(fetcher: Fetcher): (path: string, params?: Record<string, any>, options?: SWRConfiguration) => IUseApiResults;
export declare function getLimitOffset(page: number, pageSize: number): [limit: number, offset: number];
export declare function makePaginatedApi(useListApi: (params: Record<string, any>, options?: SWRConfiguration) => IUseApiResults): (page: number, pageSize: number, params: Record<string, any>, options?: SWRConfiguration) => IUseApiResults;
export declare function getUseInfiniteApiFunction(fetcher: Fetcher): (path: string, params?: Record<string, any>, options?: SWRConfiguration) => {
api: any[];
loadNext: () => Promise<any[] | undefined>;
};