Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/node/events.ts>default#emit

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
method default.prototype.emit
import { default } from "https://deno.land/std@0.36.0/node/events.ts";

Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.

Parameters

eventName: string | symbol
...args: any[]

Returns

boolean

true if the event had listeners, false otherwise