infinity-fetch - v1.5.0
    Preparing search index...

    Type Alias CursorFetchConfig<TResponse, TItem, TOut>

    CursorFetchConfig: PaginationOptions<TResponse, TItem, TOut> & {
        fetcher: (
            params: CursorParams,
            context: FetchContext,
        ) => Promise<TResponse>;
        getCursor: (response: TResponse) => string | null | undefined;
        getItems: (response: TResponse) => TItem[] | Promise<TItem[]>;
    }

    Type Parameters

    • TResponse
    • TItem
    • TOut = TItem

    Type Declaration

    • fetcher: (params: CursorParams, context: FetchContext) => Promise<TResponse>
    • getCursor: (response: TResponse) => string | null | undefined

      Returns the cursor for the next page, or null/undefined when there are no more pages

    • getItems: (response: TResponse) => TItem[] | Promise<TItem[]>

      Extracts items from a single page response. May be async