@codibre/fluent-iterable
Version:
Provides LINQ-like fluent api operations for iterables and async iterables (ES2018+).
11 lines (10 loc) • 536 B
TypeScript
import { Pager } from './types';
/**
* Translate a paginated resource into a non-paginated iterable of elements.
* @typeparam T The type of the elements of the page.
* @typeparam TToken The type of the next page token associated to the page.
* @param pager Represents the way of retrieving pages from the paginated resource.
* @returns The iterable representing a steady flow of elements from the paginated resource.
*/
declare function depaginate<T, TToken>(pager: Pager<T, TToken>): AsyncIterable<T>;
export default depaginate;