type-alias / @typed/template/EventHandler

Services

Extracts the Effect service requirements of an EventHandler.

Package version
1.0.0-beta.13
Category
Handler requirements
Since
1.0.0

Import

import type { Services } from "@typed/template/EventHandler";

Signatures

export type Services<T> = T extends EventHandler<infer _Ev, infer _E, infer R> ? R : never;

Why

Template inference uses this helper to preserve the handler’s R channel.

Ownership and lifetime

This is a compile-time projection and acquires no services.

Examples

import type { EventHandler, Services } from "@typed/template/EventHandler"

type Requirements = Services<EventHandler<MouseEvent, never, Console>>

Other public imports

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

Source