UNPKG

stimbus

Version:

An event bus for stimulus

9 lines (8 loc) 293 B
import { Listener } from "../types/env"; export default class EventBus<T, K extends keyof T> { #private; constructor(); addEvent(callerId: string, type: K, listener: Listener): void; removeEvent(callerId: string, type: K): void; trigger(type: K, detail?: unknown): void; }