Optional
options: boolean | AddEventListenerOptionsDispatches 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.
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.
Optional
listener: null | EventHandler<PeerDiscoveryEvents[K]>Optional
options: boolean | EventListenerOptionsOptional
listener: EventHandler<Event>Optional
options: boolean | EventListenerOptions
Adds types to the EventTarget class. Hopefully this won't be necessary forever.
https://github.com/microsoft/TypeScript/issues/28357 https://github.com/microsoft/TypeScript/issues/43477 https://github.com/microsoft/TypeScript/issues/299 etc