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

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

Type Parameters

K extends keyof T & string

Parameters

type: K

name of the event

...detail: T[K]

the detail that should be applied to the event

Returns

this

a Promise that resolves with this