UNPKG

944 BTypeScriptView Raw
1import { AnyAction, Dispatch, Reducer } from 'redux';
2import { Observable } from 'rxjs';
3import { NgRedux } from './ng-redux';
4import { ObservableStore } from './observable-store';
5import { Comparator, PathSelector, Selector } from './selectors';
6/** @hidden */
7export declare class SubStore<State> implements ObservableStore<State> {
8 private rootStore;
9 private basePath;
10 constructor(rootStore: NgRedux<any>, basePath: PathSelector, localReducer: Reducer<State, AnyAction>);
11 dispatch: Dispatch<AnyAction>;
12 getState: () => State;
13 configureSubStore: <SubState>(basePath: (string | number)[], localReducer: Reducer<SubState, AnyAction>) => ObservableStore<SubState>;
14 select: <SelectedState>(selector?: Selector<State, SelectedState>, comparator?: Comparator) => Observable<SelectedState>;
15 subscribe: (listener: () => void) => () => void;
16 replaceReducer: (nextLocalReducer: Reducer<State, AnyAction>) => void;
17}