/** * The base class for classes that hold a set of functions to be called in response * to an event or change in value, e.g. Observable and Event. */ export declare class Emitter = []> { protected _funcs: [fn: (...args: Args) => void, priority: number][]; private _emitting; private _toUnbind; private _needsSort; private _next; private _nextFn; /** * Clears all listeners from the event. */ clearListeners(): void; /** * Add a new handler function * @param f - The callback function to be bound. */ addListener(f: (...args: Args) => void, priority?: number): void; /** * Unbind an existing function * @param f - The callback function to be unbound. */ removeListener(f: (...args: Args) => void): void; /** * Returns a promise that will be resolved the next time this object emits. */ get next(): Promise; /** * Emit an event * * @param a - The argument to pass to handler functions. */ protected _emit(...args: Args): void; }