Skip to content

Page

Page<T> = object

Cursor page envelope used by paginated SDK methods.

Page is generic over the item type — always supply the type argument when annotating a variable that holds a page (Page<ThingItem>, Page<RepoInfo>, etc.). Using the bare name Page fails with TS2314: Generic type 'Page' requires 1 type argument(s).

import type { Page, ThingItem } from "@warmhub/sdk-ts";
const page: Page<ThingItem> = await client.thing.head("acme", "world", { limit: 50 });
for (const item of page.items) console.log(item.wref);
if (page.nextCursor) {
// pass page.nextCursor back as `cursor` on the next call
}

T

items: T[]


optional nextCursor?: string