UNPKG

@rxx/worker

Version:

React MVI micro framework.

13 lines (12 loc) 510 B
import { Observable } from 'rxjs'; export declare const STORE_SYMBOL: string | symbol; export declare function store<T extends StoreConstructor<any, any>>(Base: T): any; export interface Store<State> { initialize?(): State; } export declare type StoreConstructor<Intent, State> = new (...args: any[]) => Store<State>; export declare type StateFactory<T extends { [key: string]: any; } = { [key: string]: any; }, InitialState = any> = (observable: Observable<any>, initialState: InitialState) => T;