@ngxs-labs/entity-state
Version:
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.0.5.
38 lines (37 loc) • 1.05 kB
TypeScript
import { Payload } from './type-alias';
import { Type } from '@angular/core';
import { EntityState } from '../entity-state';
export declare type GoToPagePayload = {
page: number;
} | {
next: true;
wrap?: boolean;
} | {
prev: true;
wrap?: boolean;
} | {
last: true;
} | {
first: true;
};
export declare type EntityGoToPageAction = Payload<GoToPagePayload & {
wrap: boolean;
}>;
export declare class GoToPage {
/**
* Generates an action that changes the page index for pagination.
* Page index starts at 0.
* @param target The targeted state class
* @param payload Payload to change the page index
*/
constructor(target: Type<EntityState<any>>, payload: GoToPagePayload);
}
export declare type EntitySetPageSizeAction = Payload<number>;
export declare class SetPageSize {
/**
* Generates an action that changes the page size
* @param target The targeted state class
* @param payload The page size
*/
constructor(target: Type<EntityState<any>>, payload: number);
}