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).
Example
Section titled “Example”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}Type Parameters
Section titled “Type Parameters”T
Properties
Section titled “Properties”items:
T[]
nextCursor?
Section titled “nextCursor?”
optionalnextCursor?:string
Hit a problem or have a question? Get in touch.