overmind
Version:
Frictionless state management
43 lines (42 loc) • 1.77 kB
TypeScript
import { EventEmitter } from 'betsy';
import * as proxyStateTree from 'proxy-state-tree';
import { Devtools } from './Devtools';
import * as internalTypes from './internalTypes';
import { IConfiguration, IContext, IReaction } from './types';
export declare class Overmind<ThisConfig extends IConfiguration> implements IConfiguration {
private proxyStateTreeInstance;
private actionReferences;
private nextExecutionId;
private mode;
private reydrateMutationsForHotReloading;
private originalConfiguration;
private isStrict;
initialized: Promise<any>;
eventHub: EventEmitter<internalTypes.Events>;
devtools: Devtools;
actions: {
[K in keyof ThisConfig['actions']]: internalTypes.ResolveAction<ThisConfig['actions'][K]>;
};
state: ThisConfig['state'];
effects: ThisConfig['effects'] & {};
delimiter: string;
constructor(configuration: ThisConfig, options?: internalTypes.Options, mode?: internalTypes.DefaultMode | internalTypes.TestMode | internalTypes.SSRMode);
private createProxyStateTree;
private createExecution;
private createContext;
private addNamespace;
private scopeValue;
private addExecutionMutation;
private createAction;
private trackEffects;
private initializeDevtools;
private getState;
private getActions;
private updateActions;
getTrackStateTree(): proxyStateTree.ITrackStateTree<any>;
getMutationTree(): proxyStateTree.IMutationTree<any>;
reaction: IReaction<IContext<ThisConfig>>;
addMutationListener: (cb: proxyStateTree.IMutationCallback) => () => void;
addFlushListener: (cb: proxyStateTree.IFlushCallback) => () => proxyStateTree.IFlushCallback[];
reconfigure(configuration: IConfiguration): this;
}