Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/velo/deps.ts>EventEmitter#setMaxListeners

Performant Cache implementations for Deno. Supports LRU, LFU, ARC and other caching policies.
Go to Latest
method EventEmitter.prototype.setMaxListeners
Re-export
import { EventEmitter } from "https://deno.land/x/velo@0.1.5/deps.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. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set toInfinity (or 0) to indicate an unlimited number of listeners.

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

Parameters

n: number