Skip to main content

Class: CursorPaginatedIterator<T>

Defined in: tanqory-platform-packages/packages/api/sdk/src/core/pagination.ts:418

Cursor-based async iterator

Type Parameters​

T​

T

Implements​

  • AsyncIterable<T>

Constructors​

Constructor​

new CursorPaginatedIterator<T>(fetcher, options?): CursorPaginatedIterator<T>

Defined in: tanqory-platform-packages/packages/api/sdk/src/core/pagination.ts:423

Parameters​

fetcher​

CursorPageFetcher<T>

options?​
limit?​

number

maxItems?​

number

Returns​

CursorPaginatedIterator<T>

Methods​

[asyncIterator]()​

[asyncIterator](): AsyncIterator<T>

Defined in: tanqory-platform-packages/packages/api/sdk/src/core/pagination.ts:429

Returns​

AsyncIterator<T>

Implementation of​

AsyncIterable.[asyncIterator]


toArray()​

toArray(): Promise<T[]>

Defined in: tanqory-platform-packages/packages/api/sdk/src/core/pagination.ts:460

Collect all items

Returns​

Promise<T[]>