Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/aleph/server/deps.ts>Emitter

The Full-stack Framework in Deno.
Very Popular
Latest
interface Emitter
import { type Emitter } from "https://deno.land/x/aleph@1.0.0-beta.44/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