type-alias / @typed/template/EventHandler

EventOptions

Options for applying native event behavior before an Effect handler runs.

Package version
1.0.0-beta.7
Category
Native listener policy
Since
1.0.0

Import

import { EventOptions } from "@typed/template/EventHandler";

Signatures

export type EventOptions = {
    readonly preventDefault?: boolean;
    readonly stopPropagation?: boolean;
    readonly stopImmediatePropagation?: boolean;
};

Why

These flags make common DOM propagation choices composable while retaining AddEventListenerOptions for browser listener behavior.

Ownership and lifetime

The immutable record owns no listener. The renderer reads it when attaching the handler and the mount Scope owns the resulting registration.

Examples

import type { EventOptions } from "@typed/template/EventHandler"

const options: EventOptions = { preventDefault: true }

Other public imports

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

Source