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

x/aleph/server/deps.ts>Emitter

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