UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

26 lines 856 B
import { Observable, BehaviorSubject } from 'rxjs'; /** * A abstract state which should be included in each state. * @abstract */ export declare abstract class StateService { /** * Saves the state. Should not be accessible directly. Use map or the getter to access * the state. Use functions in the implementation to change the state. */ protected abstract state$: BehaviorSubject<any> | any; /** * Should return the current state of this StateService */ abstract get state(): any; /** * Maps to a property and just returns that property. * @param mappedProperty The property to map to. */ map(mappedProperty: (stateProperty: any) => any): Observable<any>; /** * Emits a new state. */ protected emitNewState(): void; } //# sourceMappingURL=state-service.abstract.d.ts.map