1.0.0
Eventemitter for deno.
Attributes
Includes Deno configuration
Repository
Current version released
3 years ago
evtemitter
A typed Eventemitter for deno.
This EventEmitter is based on CustomEvents.
Using EventEmitter:
import { EventEmitter } from "https://deno.land/x/evtemitter@1.0.0/mod.ts";
import type { TypedCustomEvent } from "https://deno.land/x/evtemitter@1.0.0/mod.ts";
interface Events {
ping: TypedCustomEvent<"ping">;
pong: TypedCustomEvent<
"pong",
"pong"
>;
peng: TypedCustomEvent<
"peng",
{ data: "peng" }
>;
}
const emitter = new EventEmitter();
emitter.on("");