Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
method EventEmitter.prototype.emit
import { EventEmitter } from "https://deno.land/x/pptr@1.2.0/src/EventEmitter.ts";

Emit an event and call any associated listeners.

Parameters

event: EventType
  • the event you'd like to emit
optional
eventData: any
  • any data you'd like to emit with the event

Returns

boolean

true if there are any listeners, false if there are not.