/**
 * @module Viewer/EventFan
 * Provides a facility to raise an event.
 */
/**
 * Event Handler
 * @typeparam TArgs event argument type
 */
export type EventHandler<TArgs> = (arg: TArgs) => any;
/** Unsubscribe event handler */
export type UnregisterHandler = () => any;
/**
 * Event
 * @typeparam TArgs event argument type
 */
export declare class EventFan<TArgs> {
    private _eventHandlers;
    private _trigger;
    private static _lastKey;
    private static generateKey;
    private constructor();
    /**
     * Creates a cancellation token and the trigger function.
     * @param parentToken
     */
    static createFor<TArgs>(): {
        event: EventFan<TArgs>;
        trigger: (e: TArgs) => void;
    };
    /**
     * Registers a new event handler. The handler is invoked when the cancellation is requested.
     * @param callback
     */
    register(callback: (args: TArgs) => any): UnregisterHandler;
}
