Node.js-specific extension to the EventTarget
class that emulates the equivalent EventEmitter
API. The only difference between addListener()
and addEventListener()
is that addListener()
will return a reference to the EventTarget
.
method
events.default.NodeEventTarget.addListener
type: string,
listener: (arg: any) => void
): this;