UNPKG

@ngxs-labs/entity-state

Version:

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.0.5.

17 lines (16 loc) 512 B
import { HashMap } from './internal'; /** * Interface for an EntityState. * Includes the entities in an object literal, the loading and error state and the ID of the active selected entity. */ export interface EntityStateModel<T> { entities: HashMap<T>; loading: boolean; error: Error | undefined; active: string | undefined; ids: string[]; pageSize: number; pageIndex: number; lastUpdated: number; } export declare type StateSelector<T> = (state: EntityStateModel<any>) => T;