import { IEvent } from './events'; import { IObserverTreeNode, IObserver, IObserverOptions } from './obs-disp'; import { TObserverByIdMap } from './obsMap'; import { Func } from './types'; export interface ICreateObsDispAPIParams extends Partial<{ onEvent: Func; onObsCreated: Func; onObsRemoved: Func; onWarn: Func<{ msg: string; params?: object; }, void>; }> { } export interface IObsDispAPI extends ReturnType { } export type TGetObserversMap = Func; /** * Creates an isolated instance of the obs-disp API. E.g. * Created observers and dispatched events are contained * within the scope of this API (this can be viewed as the *observable* * instance) * @param params ICreateObsDispAPIParams * @returns IObsDispAPI */ export declare const createAPI: (params?: ICreateObsDispAPIParams) => { addObsDisp: (eventHandlersOrFunc: import("./obs-disp").IObserverEventHandlers | Func, options?: IObserverOptions, props?: T) => IObserver; obsDispCreator: (args_0: import("./obs-disp").IObserverEventHandlers | Func, args_1?: IObserverOptions, args_2?: T_1) => (props: T_1) => IObserver; dispatchEvent: (event: string | Partial, options?: import("./obs-disp").TEventDispatchOptions) => void; dispatchDeferredEvent: (event: string | Partial, options?: import("./obs-disp").TEventDispatchOptions) => void; createThrottledDispatch: (ev: IEvent, opts?: { throttleMs?: number; debugLog?: string; }) => () => any; checkObsExists: (obs: IObserver) => boolean; checkObsExistsById: (id: string) => boolean; removeAllObservers: () => void; removeObs: (observer: IObserver, skipChildren?: boolean) => void; removeObsById: (id: string) => void; getObsById: (id: string) => IObserver; getAllObservers: () => IObserver[]; getObserversTree: () => IObserverTreeNode[]; };