@ngxs-labs/entity-state
Version:
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.0.5.
22 lines (21 loc) • 778 B
TypeScript
import { EntitySelector, Updater } from './type-alias';
import { EntityState } from '../entity-state';
import { Type } from '@angular/core';
export interface EntityUpdateAction<T> {
payload: {
id: EntitySelector<T>;
data: Updater<T>;
};
}
export declare class Update<T> {
/**
* Generates an action that will update the current active entity.
* If no entity is active a runtime error will be thrown.
* @param target The targeted state class
* @param id An EntitySelector that determines the entities to update
* @param data An Updater that will be applied to the selected entities
* @see EntitySelector
* @see Updater
*/
constructor(target: Type<EntityState<T>>, id: EntitySelector<T>, data: Updater<T>);
}