Type alias OnPageFn<ItemT>

OnPageFn<ItemT>: ((data: ItemT[], total: number) => boolean | void | undefined | PromiseLike<boolean | void | undefined>)

Type Parameters

Type declaration

    • (data: ItemT[], total: number): boolean | void | undefined | PromiseLike<boolean | void | undefined>
    • Callback for a page of results from a paginated API endpoint. If the callback returns false, pagination will stop.

      Parameters

      • data: ItemT[]

        The array of items for this page.

      • total: number

        The total number of results for the query.

      Returns boolean | void | undefined | PromiseLike<boolean | void | undefined>

Generated using TypeDoc