/** * Represents a page of data. * * @param T - * The type of data on the page. */ export interface IZPage { /** * The total number of items across all pages. */ count: number; /** * The current data view on the page. */ data: T[]; } /** * A builder for a page object. */ export declare class ZPageBuilder { private _page; /** * Initializes a new instance of this object. */ constructor(); /** * Sets the count to 0 and the data to the empty array. * * @returns * This object. */ empty(): ZPageBuilder; /** * Creates a page of data that has only one item, and it represents the entire data set. * * @param item - * The only item in the data set. * * @returns * This object. */ singleton(item: D): ZPageBuilder; /** * Creates a page of data where the data represents the entire data set. * * @param data - * The entire data set. * * @returns * This object. */ all(data: D[]): ZPageBuilder; /** * Sets the page view. * * @param data - * The view of the data on the given page. * * @returns * This object. */ data(data: D[]): ZPageBuilder; /** * Sets the total item count across all pages. * * @param count - * The total item count across all pages. * * @returns * This object. */ count(count: number): this; /** * Copies another page object into this page builder. * * @param other - * The page to copy. * * @returns * This object. */ copy(other: IZPage): this; /** * Returns the built page. * * @returns * The built page. */ build(): IZPage; }