Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno/ext/node/polyfills/events.ts>default#removeAllListeners

A modern runtime for JavaScript and TypeScript.
Go to Latest
method default.prototype.removeAllListeners
import { default } from "https://deno.land/x/deno@v1.39.0/ext/node/polyfills/events.ts";

Removes all listeners, or those of the specified eventName.

It is bad practice to remove listeners added elsewhere in the code, particularly when the EventEmitter instance was created by some other component or module (e.g. sockets or file streams).

Returns a reference to the EventEmitter, so that calls can be chained.

Parameters

optional
event: string | symbol