Skip to main content
Go to Latest
method EventEmitter.prototype.emit
import { EventEmitter } from "https://deno.land/x/evtemitter@v3.0.0/EventEmitter.ts";

Emit an event with given detail Calls all listeners that listen to the emitted event

Type Parameters

Ev extends EventNames<UserEvents>

Parameters

type: Ev

name of the event

...unnamed 1: CustomEventDetailParameter<UserEvents, Ev>

the detail that should be applied to the event

Returns

this

a Promise that resolves with this