An implementation of a typed event target etc

interface CircuitRelayService {
    #private: any;
    reservations: PeerMap<RelayReservation>;
    addEventListener<K>(type, listener, options?): void;
    dispatchEvent(event): boolean;
    listenerCount(type): number;
    removeEventListener<K>(type, listener?, options?): void;
    safeDispatchEvent<Detail>(type, detail?): boolean;
}

Hierarchy (view full)

Properties

#private: any
reservations: PeerMap<RelayReservation>

Methods

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    MDN Reference

    Parameters

    Returns boolean

  • Parameters

    • type: string

    Returns number