Interface EventedList<T, M>

List of generic items which can dispatch events.

interface EventedList<T, M> {
    length: number;
    addEventListener<TType>(type: TType | readonly TType[], listener: EventListener<M[TType]>): void;
    item(index: number): undefined | T;
    removeEventListener<TType>(type: TType | readonly TType[], listener: EventListener<M[TType]>): void;
}

Type Parameters

Hierarchy (view full)

Properties

length: number

The number of items in the list.

Methods

  • Add the given listener for the given event type(s).

    Type Parameters

    • TType extends string

    Parameters

    Returns void

  • Returns the object representing the nth item in the list.

    Parameters

    • index: number

      The index of the item to retrieve.

    Returns undefined | T