import { Action } from './Action'; import { Reducer } from './Reducer'; import { Dispatcher } from './Dispatcher'; export interface ReducersMapper<$State> { (ReducerStateExtractor: ReducerStateExtractor): $State; } export interface ReducerStateExtractor { <$State>(reducer: Reducer<$State>): $State; } export interface Subscriber<$State> { (state: $State): any; } export declare namespace ReducerStateExtractor { const extractState: <$State>(reducer: Reducer<$State>) => $State; const applyAction: (action: Action, ifChanged: Function) => <$State>(reducer: Reducer<$State>) => $State; } export declare class Store<$State> { state: $State; private _reducersMapper; private _subscribers; private _dispatcher; constructor(reducersMapper: ReducersMapper<$State>, dispatcher: Dispatcher); applyAction: (action: Action) => $State; registerSubscriber(subscriber: Subscriber<$State>): void; removeSubscriber(subscriber: Subscriber<$State>): void; private _notifyToSubscribers(); }