TypeScript API / contentia/core / ContentiaStream / paginate
Function: paginate()
ts
function paginate<A, D, R>(initialCursor, fetchPage): ContentiaStream<A, D, R>;Paginate through pages, flattening items into the ContentiaStream's data channel. The final done value is taken from the last page fetched ("last wins").
Type Parameters
| Type Parameter | Default type |
|---|---|
A | - |
D extends ContentiaDone | - |
R | never |
Parameters
| Parameter | Type |
|---|---|
initialCursor | string | undefined |
fetchPage | (cursor) => Effect<{ done: D; items: readonly A[]; nextCursor?: string; }, ContentiaError<ErrorCode, number>, R> |
Returns
ContentiaStream<A, D, R>