Module

x/aleph/server/deps.ts>Emitter

The Full-stack Framework in Deno.
Go to Latest
interface Emitter
import { type Emitter } from "https://dotland.deno.dev/x/aleph@1.0.0-beta.15/server/deps.ts";

Type Parameters

Events extends Record<EventType, unknown>

Properties

all: EventHandlerMap<Events>

Methods

on<Key extends keyof Events>(type: Key, handler: Handler<Events[Key]>): void
on(type: "*", handler: WildcardHandler<Events>): void
off<Key extends keyof Events>(type: Key, handler?: Handler<Events[Key]>): void
off(type: "*", handler: WildcardHandler<Events>): void
emit<Key extends keyof Events>(type: Key, event: Events[Key]): void
emit<Key extends keyof Events>(type: undefined extends Events[Key] ? Key : never): void