@dazejs/framework
Version:
Daze.js - A powerful web framework for Node.js
31 lines (30 loc) • 844 B
TypeScript
export interface PaginatorOption {
currentPageKey?: string;
perPageKey?: string;
totalkey?: string;
dataKey?: string;
}
export declare class Paginator {
static currentPageKey: string;
static perPageKey: string;
static totalkey: string;
static dataKey: string;
private _perPage;
private _currentPage;
private _total;
private _items;
private _option?;
constructor(items: any[], total: number, currentPage: number, perPage: number, option?: PaginatorOption);
static configure(option: PaginatorOption): void;
getDataKey(): string;
getCurrentPageKey(): string;
getTotalKey(): string;
getPerPageKey(): string;
getCurrentPage(): number;
getPerPage(): number;
getTotal(): number;
getData(): any[];
toJSON(): {
[x: string]: number | any[];
};
}