@rxx/core
Version:
React MVI micro framework.
58 lines (57 loc) • 1.87 kB
TypeScript
import { StoreConstructor, Store, StateFactory } from './store/store';
import { Intent, IntentConstructor } from './intent/intent';
import { Handler } from './handler/handler';
import { StateHandler } from './handler/state-handler';
import { IntentHandler } from './intent/intent-handler';
import { SubjectTree } from './subject';
export interface StoreGroupState {
[key: string]: any;
}
export declare class Provisioning<ContextType extends {
provisioning?: Provisioning<any>;
__intent?: Intent;
__subject?: SubjectTree;
}> {
private name;
private context;
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 devTools;
private devToolsSubscribers;
private cache;
constructor(name: string, context: ContextType, 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(): void;
getStores(): Store<any>[];
getState(): any;
getIntentHandler(): IntentHandler;
getIntentInstance(): any;
getIntent(): Intent;
getSubject(): SubjectTree;
subscribe(subscriber: (state: any) => void, runInitial?: boolean): () => void;
getHandlers(): {
[key: string]: Handler;
};
private subscribeHandler;
private notifyUpdate;
private notifyUpdateView;
}