UNPKG

overmind

Version:
48 lines (47 loc) 1.89 kB
import { IConfiguration, IContext, IReaction } from "./types.js"; import { Devtools } from "./Devtools.js"; import { DefaultMode, Events, Options, ResolveAction, SSRMode, TestMode } from "./internalTypes.js"; import * as proxyStateTree from "proxy-state-tree"; import { EventEmitter } from "betsy"; //#region src/Overmind.d.ts declare class Overmind<ThisConfig extends IConfiguration> implements IConfiguration { private proxyStateTreeInstance; private actionReferences; private nextExecutionId; private mode; private rehydrateMutationsForHotReloading; private originalConfiguration; private isStrict; initialized: Promise<any>; eventHub: EventEmitter<Events>; devtools: Devtools; actions: { [K in keyof ThisConfig['actions']]: ResolveAction<ThisConfig['actions'][K]> }; state: ThisConfig['state']; effects: ThisConfig['effects'] & {}; delimiter: string; constructor(configuration: ThisConfig, options?: Options, mode?: DefaultMode | TestMode | SSRMode); private currentExecution; private getCurrentExecution; private createProxyStateTree; private createExecution; private createScopedProxy; private createContext; private addNamespace; private scopeValue; private addExecutionMutation; private createAction; private trackEffects; private initializeDevtools; private getState; private getActions; private updateActions; getTrackStateTree(): proxyStateTree.ITrackStateTree<object, Devtools | undefined>; getMutationTree(): proxyStateTree.IMutationTree<object, Devtools | undefined>; reaction: IReaction<IContext<ThisConfig>>; addMutationListener: (cb: proxyStateTree.IMutationCallback) => () => void; addFlushListener: (cb: proxyStateTree.IFlushCallback) => () => proxyStateTree.IFlushCallback[]; reconfigure(configuration: IConfiguration): this; } //#endregion export { Overmind }; //# sourceMappingURL=Overmind.d.ts.map