/**
 * Event & listener abstraction for a single "event" type. The type provides extra functionality beyond just notifying
 * listeners. It adds PhET-iO instrumentation capabilities as well as validation. For the lightest-weight, fastest
 * solution with the smallest memory footprint, see `TinyEmitter`.
 *
 * @author Sam Reid (PhET Interactive Simulations)
 * @author Michael Kauzmann (PhET Interactive Simulations)
 */
import '../../globals.js';
import type StrictOmit from '../../phet-core/js/types/StrictOmit.js';
import PhetioDataHandler, { type PhetioDataHandlerOptions } from '../../tandem/js/PhetioDataHandler.js';
import { AnyIOType } from '../../tandem/js/types/IOType.js';
import { type DisposerOptions } from './Disposable.js';
import type TEmitter from './TEmitter.js';
import { type TEmitterListener, type TEmitterParameter } from './TEmitter.js';
import { type TinyEmitterOptions } from './TinyEmitter.js';
type SelfOptions = Pick<TinyEmitterOptions, 'reentrantNotificationStrategy'>;
export type EmitterOptions = SelfOptions & StrictOmit<PhetioDataHandlerOptions, 'phetioOuterType'>;
export default class Emitter<T extends TEmitterParameter[] = []> extends PhetioDataHandler<T> implements TEmitter<T> {
    private readonly tinyEmitter;
    constructor(providedOptions?: EmitterOptions);
    /**
     * Emit to notify listeners
     */
    emit(...args: T): void;
    /**
     * Disposes an Emitter. All listeners are removed.
     */
    dispose(): void;
    /**
     * Adds a listener which will be called during emit.
     */
    addListener(listener: TEmitterListener<T>, options?: DisposerOptions): void;
    /**
     * Removes a listener
     */
    removeListener(listener: TEmitterListener<T>): void;
    /**
     * Removes all the listeners
     */
    removeAllListeners(): void;
    /**
     * Checks whether a listener is registered with this Emitter
     */
    hasListener(listener: TEmitterListener<T>): boolean;
    /**
     * Returns true if there are any listeners.
     */
    hasListeners(): boolean;
    /**
     * Returns the number of listeners.
     */
    getListenerCount(): number;
    /**
     * Convenience function for debugging a Property's value. It prints the new value on registration and when changed.
     * @param name - debug name to be printed on the console
     * @returns - the handle to the listener added in case it needs to be removed later
     */
    debug(name: string): TEmitterListener<T>;
    /**
     * PhET-iO Type for Emitter.
     *
     * Providing validators to instrumented Emitters:
     * Instrumented Emitters should have their `validators` for each argument passed via EmitterIO (the phetioType).
     * To provide validators, there are two methods. First, by default each IOType has its own
     * validator that will be used. So specifying an argument object like `{ type: NumberIO }` will automatically use
     * `NumberIO.validator` as the validator. This can be overridden with the `validator` key (second option), like
     * { type: NumberIO, validator: { isValidValue: v=> typeof v === 'number' &&  v < 5 } }`
     * NOTE: currently the implementation is either/or, if a validator is provided via the `validator` key, the validator
     * from the `type` will be ignored.
     * see https://github.com/phetsims/axon/issues/204 for more details.
     *
     * @author Sam Reid (PhET Interactive Simulations)
     * @author Michael Kauzmann (PhET Interactive Simulations)
     * @author Andrew Adare (PhET Interactive Simulations)
     */
    static readonly EmitterIO: (parameterTypes: AnyIOType[]) => AnyIOType;
}
export {};
//# sourceMappingURL=Emitter.d.ts.map