Skip to main content
Version: v8.0.0

PaginationConfig

Untyped form of the pagination, used where the request type is not known


Import
import { PaginationConfig } from "@hyper-fetch/core"

Preview​

type PaginationConfig = {
cursor?: string;
hasNext?: (context: any) => boolean;
hasPrevious?: (context: any) => boolean;
in?: PaginationSource;
items?: string | (context: any) => readonly unknown[];
limit?: string;
next?: string | (context: any) => unknown;
offset?: string;
page?: string;
previous?: string | (context: any) => unknown;
total?: string | (context: any) => number | null | undefined;
}

Structure​

PaginationConfig
NameTypeDescription
cursor
string
in
PaginationSource
items
string | (context: any) => readonly unknown[]
limit
string
next
string | (context: any) => unknown
offset
string
page
string
previous
string | (context: any) => unknown
total
string | (context: any) => number | null | undefined
hasNext
(context: any) => boolean
hasPrevious
(context: any) => boolean