import { IChangeBatcher, IContextManager, IStore, ISubContext, Params, SubFn } from "./model"; declare class GlobalContextManagerImpl implements IContextManager { private readonly contexts; peek(): ISubContext | null; push(context: ISubContext): void; pop(context: ISubContext): void; root(): ISubContext | null; } export declare const GlobalContextManager: GlobalContextManagerImpl; export declare abstract class BaseSubContext implements ISubContext, IChangeBatcher { private readonly subscriptions; private readonly oldSubscriptions; private readonly changeBatchers; private myStore; onEnter(): void; onExit(): void; dispose(): void; subscribeTo(parent: ISubContext): void; store(): IStore | null; setStore(store: IStore): void; /** * Note: if you dispatch any changes to dependents from * this method, you MUST call [dispatchChangesBatched] */ abstract onDependenciesChanged(): void; requestBatchedChanges(recipient: IChangeBatcher): void; notifyChangesBatched(): void; protected describeState(): any; protected dispatchChangesBatched(): void; } export declare function withContext(context: ISubContext, fn: SubFn, ...params: P): V; export {};