export declare type Listener = (a: any) => any;
declare type Listeners = {
    [_: string]: Array<Listener>;
};
export declare class Event {
    readonly type: string;
    constructor(type: string, data?: any);
}
interface ErrorLike {
    message: string;
}
export declare class ErrorEvent extends Event {
    error: ErrorLike;
    constructor(error: ErrorLike, data?: any);
}
/**
 * Methods mixed in to other classes for event capabilities.
 *
 * @mixin Evented
 */
export declare class Evented {
    _listeners: Listeners;
    _oneTimeListeners: Listeners;
    _eventedParent: Evented | undefined | null;
    _eventedParentData: any | (() => any) | undefined | null;
    /**
     * Adds a listener to a specified event type.
     *
     * @param {string} type The event type to add a listen for.
     * @param {Function} listener The function to be called when the event is fired.
     *   The listener function is called with the data object passed to `fire`,
     *   extended with `target` and `type` properties.
     * @returns {Object} `this`
     */
    on(type: string, listener: Listener): this;
    /**
     * Removes a previously registered event listener.
     *
     * @param {string} type The event type to remove listeners for.
     * @param {Function} listener The listener function to remove.
     * @returns {Object} `this`
     */
    off(type: string, listener: Listener): this;
    /**
     * Adds a listener that will be called only once to a specified event type.
     *
     * The listener will be called first time the event fires after the listener is registered.
     *
     * @param {string} type The event type to listen for.
     * @param {Function} listener The function to be called when the event is fired the first time.
     * @returns {Object} `this`
     */
    once(type: string, listener: Listener): this;
    fire(event: Event, properties?: any): this;
    /**
     * Returns a true if this instance of Evented or any forwardeed instances of Evented have a listener for the specified type.
     *
     * @param {string} type The event type
     * @returns {boolean} `true` if there is at least one registered listener for specified event type, `false` otherwise
     * @private
     */
    listens(type: string): any;
    /**
     * Bubble all events fired by this instance of Evented to this parent instance of Evented.
     *
     * @private
     * @returns {Object} `this`
     * @private
     */
    setEventedParent(parent?: Evented | null, data?: any | (() => any)): this;
}
export {};
//# sourceMappingURL=evented.d.ts.map