Interface PaginatedResult<T>

Represents the result of a paginated query.

interface PaginatedResult<T> {
    items: T[];
    current(): Promise<PaginatedResult<T>>;
    first(): Promise<PaginatedResult<T>>;
    hasNext(): boolean;
    isLast(): boolean;
    next(): Promise<null | PaginatedResult<T>>;
}

Type Parameters

  • T

Properties

Methods

Properties

items: T[]

The items returned by the query.

Methods

  • Whether there are more items to query.

    Returns boolean

    true if there are more items to query, false otherwise.

  • Whether this is the last page of items.

    Returns boolean

    true if this is the last page of items, false otherwise.