Import
import { EventHandler } from "@typed/template";Access EventHandler.fromEffectOrEventHandler through the imported EventHandler export. Its declaration below describes the member.
This public exposure is a re-export. Its import path is supported; declaration documentation is shared with the other public exposures below.
Signatures
export declare function fromEffectOrEventHandler<Ev extends Event, E = never, R = never>(handler: Effect.Effect<unknown, E, R> | EventHandler<Ev, E, R>): EventHandler<Ev, E, R>;Why
Template event parts accept either a reusable Effect or an event-aware handler without erasing either value’s error and service channels.
Ownership and lifetime
Conversion is inert. The renderer Scope owns the eventual listener and fiber.
Examples
import { Effect } from "effect"
import { fromEffectOrEventHandler } from "@typed/template/EventHandler"
const handler = fromEffectOrEventHandler(Effect.log("clicked"))Other public imports
These import paths expose the same declaration. Each page retains its own public name and signature.