E extends Event
handleEvent(object: E): void
This is the Typed Event Target library you are looking for.
E extends Event
handleEvent(object: E): void
Add Package
deno add jsr:@workers/typed-event-target
Import symbol
import { type TypedEventListenerObject } from "@workers/typed-event-target";
---- OR ----
Import directly with a jsr specifier
import { type TypedEventListenerObject } from "jsr:@workers/typed-event-target";
Add Package
npx jsr add @workers/typed-event-target
Import symbol
import { type TypedEventListenerObject } from "@workers/typed-event-target";
Add Package
yarn dlx jsr add @workers/typed-event-target
Import symbol
import { type TypedEventListenerObject } from "@workers/typed-event-target";
Add Package
pnpm dlx jsr add @workers/typed-event-target
Import symbol
import { type TypedEventListenerObject } from "@workers/typed-event-target";
Add Package
bunx jsr add @workers/typed-event-target
Import symbol
import { type TypedEventListenerObject } from "@workers/typed-event-target";