UNPKG

mini-rx-store

Version:

MiniRx: The Lightweight RxJS Redux Store

10 lines (9 loc) 555 B
import { Observable } from 'rxjs'; import { Action, AppState, FeatureConfig, Reducer, StoreConfig } from '@mini-rx/common'; export declare abstract class Store { abstract feature<StateType extends object>(featureKey: string, reducer: Reducer<StateType>, config?: FeatureConfig<StateType>): void; abstract dispatch(action: Action): void; abstract select<R>(mapFn: (state: AppState) => R): Observable<R>; abstract effect(effect: Observable<any>): void; } export declare function configureStore(config: StoreConfig<AppState>): Store | never;