UNPKG

1.07 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';
7export declare abstract class StateObservable extends Observable<any> {
8}
9export declare class State<T> extends BehaviorSubject<any> implements OnDestroy {
10 static readonly INIT: "@ngrx/store/init";
11 private stateSubscription;
12 constructor(actions$: ActionsSubject, reducer$: ReducerObservable, scannedActions: ScannedActionsSubject, initialState: any);
13 ngOnDestroy(): void;
14}
15export declare type StateActionPair<T, V extends Action = Action> = {
16 state: T | undefined;
17 action?: V;
18};
19export declare function reduceState<T, V extends Action = Action>(stateActionPair: StateActionPair<T, V> | undefined, [action, reducer]: [V, ActionReducer<T, V>]): StateActionPair<T, V>;
20export declare const STATE_PROVIDERS: Provider[];