import { AnyAction, Dispatch, Middleware, Reducer, Store, StoreEnhancer, Unsubscribe } from 'redux'; import { Observable } from 'rxjs'; import { ObservableStore } from './observable-store'; import { Comparator, PathSelector, Selector } from './selectors'; /** * This is the public interface of @angular-redux/store. It wraps the global * redux store and adds a few other add on methods. It's what you'll inject * into your Angular application as a service. */ export declare abstract class NgRedux implements ObservableStore { /** @hidden, @deprecated */ static instance?: ObservableStore; /** * Configures a Redux store and allows NgRedux to observe and dispatch * to it. * * This should only be called once for the lifetime of your app, for * example in the constructor of your root component. * * @param rootReducer Your app's root reducer * @param initState Your app's initial state * @param middleware Optional Redux middlewares * @param enhancers Optional Redux store enhancers */ abstract configureStore: (rootReducer: Reducer, initState: RootState, middleware?: Middleware[], enhancers?: StoreEnhancer[]) => void; /** * Accepts a Redux store, then sets it in NgRedux and * allows NgRedux to observe and dispatch to it. * * This should only be called once for the lifetime of your app, for * example in the constructor of your root component. If configureStore * has been used this cannot be used. * * @param store Your app's store */ abstract provideStore: (store: Store) => void; abstract dispatch: Dispatch; abstract getState: () => RootState; abstract subscribe: (listener: () => void) => Unsubscribe; abstract replaceReducer: (nextReducer: Reducer) => void; abstract select: (selector?: Selector, comparator?: Comparator) => Observable; abstract configureSubStore: (basePath: PathSelector, localReducer: Reducer) => ObservableStore; }