TypeScript API / laikacms/core / LaikaStream / paginate
Function: paginate()
ts
function paginate<A, D, R>(initialCursor, fetchPage): LaikaStream<A, D, R>;Paginate through pages, flattening items into the LaikaStream'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 LaikaDone | - |
R | never |
Parameters
| Parameter | Type |
|---|---|
initialCursor | string | undefined |
fetchPage | (cursor) => Effect<{ done: D; items: readonly A[]; nextCursor?: string; }, LaikaError<ErrorCode, number>, R> |
Returns
LaikaStream<A, D, R>