UNPKG

1.23 kBTypeScriptView Raw
1import { OnDestroy, Provider } from '@angular/core';
2import { BehaviorSubject, Observable } from 'rxjs';
3import { ActionsSubject } from './actions_subject';
4import { Action, ActionReducer } from './models';
5import { ReducerObservable } from './reducer_manager';
6import { ScannedActionsSubject } from './scanned_actions_subject';
7import * as i0 from "@angular/core";
8export declare abstract class StateObservable extends Observable<any> {
9}
10export declare class State<T> extends BehaviorSubject<any> implements OnDestroy {
11 static readonly INIT: "@ngrx/store/init";
12 private stateSubscription;
13 constructor(actions$: ActionsSubject, reducer$: ReducerObservable, scannedActions: ScannedActionsSubject, initialState: any);
14 ngOnDestroy(): void;
15 static ɵfac: i0.ɵɵFactoryDeclaration<State<any>, never>;
16 static ɵprov: i0.ɵɵInjectableDeclaration<State<any>>;
17}
18export declare type StateActionPair<T, V extends Action = Action> = {
19 state: T | undefined;
20 action?: V;
21};
22export declare function reduceState<T, V extends Action = Action>(stateActionPair: StateActionPair<T, V> | undefined, [action, reducer]: [V, ActionReducer<T, V>]): StateActionPair<T, V>;
23export declare const STATE_PROVIDERS: Provider[];