import { type TypedEventRecord } from "https://deno.land/x/enzastdlib@v0.0.4/events/mod.ts";
Represents a record of event names associated with their CustomEvent
-derived
classes.
Examples
Example 1
Example 1
class UpdateEvent extends CustomEvent<{ original: unknown, replacement: unknown }> {}
// **NOTE**: While you can import this type and use `interface MyEvents extends TypedEventRecord`
// you will lose autocomplete in IDEs.
//
// So this example is just showcasing the expected interface of `Record<string, CustomEvent>`.
type MyEvents = {
update: UpdateEvent;
};
definition: Record<string, CustomEvent>