UNPKG

@rxx/worker

Version:

React MVI micro framework.

54 lines (53 loc) 1.73 kB
import { StoreConstructor, Store, StateFactory } from './store/store'; import { IntentConstructor } from './intent/intent'; import { Handler } from './handler/handler'; import { StateHandler } from './handler/state-handler'; export interface StoreGroupState { [key: string]: any; } export declare class Provisioning { private intentConstructors; private storeConstructors; private stateFactory; private service; private stateHandlers; private intentAdvice; private subscription; private intent; private subject; private isDisposed; private handlerSubscriptions; private unobservablifiedState; private subscribers; private state; private handlers; private cache; constructor(intentConstructors: { [key: string]: IntentConstructor; }, storeConstructors: StoreConstructor<any, any>[], stateFactory?: StateFactory, service?: { [key: string]: any; }, stateHandlers?: { [key: string]: StateHandler; }, intentAdvice?: (intentInstance: any) => any); dispose(removeCache?: boolean): void; prepare(parentState?: any): void; emitAsync(emitter: () => void): void; getPublisher(): { (type: string, payload?: any): void; subscribe(callback: (payload: { type: string; payload: any; }) => void): void; unsubscribe(): void; }; getState(): any; getHandlers(): { [key: string]: Handler; }; subscribe(subscriber: (state: any, isInitial?: boolean) => void, runInitial?: boolean): () => void; getStores(): Store<any>[]; getIntentInstance(): any; private subscribeHandler; private notifyUpdate; private notifyUpdateView; }