Import
import type { BeforeNavigationHandler } from "@typed/navigation/Navigation";Signatures
export type BeforeNavigationHandler<R, R2> = (event: BeforeNavigationEvent) => Effect.Effect<Option.Option<Effect.Effect<unknown, RedirectError | CancelNavigation, R2>>, RedirectError | CancelNavigation, R>;Why
The outer Effect decides whether a handler participates; the selected inner Effect can redirect or cancel. This preserves declaration order and separates cheap selection from retained work.
Ownership and lifetime
Registration captures the handler’s Effect context and is owned by its Scope. The active transition runs selected effects sequentially and interruption releases normal Effect resources.
Other public imports
These import paths expose the same declaration. Each page retains its own public name and signature.