PaginatedReadResult<T>: ReadResult<T, UnspecifiedError> & {
    beforeCount: number;
    hasMore: boolean;
    next: (() => Promise<void>);
    prev: (() => Promise<void>);
}

A paginated read result.

Type Parameters

  • T

Type declaration

  • beforeCount: number

    The number of items that are available before the results set.

    Use this to determine if you want to offer the option of loading more items at the beginning of the list via the prev method.

  • hasMore: boolean

    Whether there are more items to fetch in the next page

  • next: (() => Promise<void>)

    Fetches the next page of items.

    Returns

    A promise that resolves when the operation is complete, regardless if it had any items to fetch.

      • (): Promise<void>
      • Fetches the next page of items.

        Returns Promise<void>

        A promise that resolves when the operation is complete, regardless if it had any items to fetch.

  • prev: (() => Promise<void>)

    Fetches the previous page of items.

    Returns

    A promise that resolves when the operation is complete, regardless if it had any items to fetch.

      • (): Promise<void>
      • Fetches the previous page of items.

        Returns Promise<void>

        A promise that resolves when the operation is complete, regardless if it had any items to fetch.