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

x/pbkit/core/runtime/async/event-emitter.ts>EventEmitter

Protobuf toolkit for modern web development
Go to Latest
interface EventEmitter
import { type EventEmitter } from "https://deno.land/x/pbkit@v0.0.54/core/runtime/async/event-emitter.ts";

Type Parameters

Events extends Record<string, any>

Methods

emit<Type extends keyof Events>(type: Type, event: Events[Type]): void
on<Type extends keyof Events>(type: Type | "*", listener: Listener<Events[Type]>): Off
off(type: keyof Events): void