import type { ErrorType } from '../errors/utils.js'; import type { MaybePromise } from '../types/utils.js'; type Callback = ((...args: any[]) => any) | undefined; type Callbacks = Record; export type ObserveErrorType = ErrorType; /** @internal */ export declare const listenersCache: Map; /** @internal */ export declare const cleanupCache: Map void>; type EmitFunction = (emit: callbacks) => MaybePromise void)>; /** * @description Sets up an observer for a given function. If another function * is set up under the same observer id, the function will only be called once * for both instances of the observer. */ export declare function observe(observerId: string, callbacks: callbacks, fn: EmitFunction): () => void; export {}; //# sourceMappingURL=observe.d.ts.map