Skip to main content
Module

x/aleph/events.ts>EventEmitter#setMaxListeners

The Full-stack Framework in Deno.
Very Popular
Go to Latest
method EventEmitter.prototype.setMaxListeners
import { EventEmitter } from "https://deno.land/x/aleph@v0.2.21/events.ts";

By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. Obviously, not all events should be limited to just 10 listeners. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.

Parameters

n: number