UNPKG

ngx-base-state

Version:

Base classes for creation state service via Rxjs observable

17 lines (16 loc) 660 B
import { BaseState } from './base.state'; /** * @class * @classdes Object state class. Used for save state with Object type. */ export declare abstract class ObjectState<T extends object> extends BaseState<T> { /** * Updates state by merging new partial object with the existing one. * @public * @param {T | null} value - the value that should be set to update `BehaviorSubject`. */ updateWithPartial(value: Partial<T>): void; protected setNewValue(value: T | null): void; protected catchError(error: Error | TypeError, actionName: string): void; protected validateDataType(data: unknown): void; }