Interface ChronologicalFeedOptions<TData, K>

Options for chronological feed pagination on date-backed fields.

interface ChronologicalFeedOptions<
    TData extends JsonObject,
    K extends Extract<DateKeys<TData>, string>,
> {
    cursor?: NonNullable<TData[K]>;
    cursorField: K;
    direction?: "ASC" | "DESC";
    limit?: number;
}

Type Parameters

Properties

cursor?: NonNullable<TData[K]>

Exclusive cursor value returned by the previous page (Date).

cursorField: K

Date-backed manifest key to use as the cursor (camelCase).

direction?: "ASC" | "DESC"

Sort direction; defaults to DESC for newest-first feeds.

limit?: number

Page size; defaults to 10.