@redux-multipurpose/core
Version:
## Installation Redux Multipurpose core is available as a package on NPM:
19 lines (18 loc) • 995 B
TypeScript
import { Observable } from 'rxjs';
import { Selector, Action } from '@reduxjs/toolkit';
import { Reducer, AnyAction } from 'redux';
import { MultipurposeStoreOptions } from './entities/store-options';
export declare const initializeStore: (options: MultipurposeStoreOptions) => void;
export declare const store: {
getState$: () => Observable<any>;
getState: () => any;
select: <R, T>(selector: Selector<R, T>) => Observable<T>;
selectSync: <R_1, T_1>(selector: Selector<R_1, T_1>) => T_1;
dispatch: (action: Action | any) => void;
addReducer: <S = any, A extends Action<any> = AnyAction>(key: string, reducer: Reducer<S, A>) => void;
removeReducer: (key: string) => void;
replaceEpics: (newRootEpic: any) => void;
};
export declare const select: (selector: any) => (target: any, key: any) => void;
export declare const get: (selector: any) => (target: any, key: any) => void;
export declare const dispatch: () => (target: any, key: any, descriptor?: any) => any;