ABB Ability™ History UI SDK - Client API Reference
    Preparing search index...

    Interface IEvent<T>

    An Event Handle

    interface IEvent<T> {
        AddListener(listener: (eventdata: T) => void, onlyonce?: boolean): void;
        Fire(eventdata: T, safe?: boolean): void;
        RemoveListener(listener: (eventdata: T) => void): void;
        Then(dothis: (eventdata: T) => void): void;
        Wait(): Promise<T>;
    }

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index

    Methods

    • Add a listener for the event.

      Parameters

      • listener: (eventdata: T) => void

        The event listener callback, the event data passed as parameter

      • Optionalonlyonce: boolean

        The event listener callback will only be triggered the first time the event occurs. (Automatically removed after the

      Returns void

    • Signal the event.

      Parameters

      • eventdata: T

        The event data for the event.

      • Optionalsafe: boolean

        Catch exceptions from individual event listeners.

      Returns void

    • Remove a listener of the event.

      Parameters

      • listener: (eventdata: T) => void

        The event listener callback to be removed.

      Returns void

    • When the event is in signaled state run the specified callback. Will be only run once and then automatically removed from the event listeners.

      Parameters

      • dothis: (eventdata: T) => void

        The callback to run when the event is signaled.

      Returns void

    • Wait once for the event to be signaled

      Returns Promise<T>