Result of the pagesOf method.

interface Pages {
    type: "simple" | "start" | "end" | "both";
    page: number;
    total: number;
    start: number[];
    pages: number[];
    end: number[];
}

Properties

type: "simple" | "start" | "end" | "both"

Type of pagination.

page: number

Current page from input.

total: number

Total count of pages.

start: number[]

Initial set of pages (when there are a lot of pages).

pages: number[]

Middle pages (when there are a lot of pages).

end: number[]

Last pages.