type-alias / @typed/ui/Dom

EventOf

Extracts the native Event parameter from an event-handler input.

Learn this UI primitive →

Package version
1.0.0-beta.13
Category
Event input types
Since
1.0.0

Import

import type { EventOf } from "@typed/ui/Dom";

This public exposure is a re-export. Its import path is supported; declaration documentation is shared with the other public exposures below.

Signatures

export type EventOf<Handler> = NonNullable<Handler> extends (...args: infer Args) => any ? Args[0] extends globalThis.Event ? Args[0] : globalThis.Event : globalThis.Event;

Why

Host prop merging must preserve the concrete browser event type while combining user and internal handlers.

Ownership and lifetime

Type-only; listener lifetime remains owned by the rendered template Scope.

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source