Module / v1.0.0-beta.13

@typed/router/Matcher

40 unique exports available through this public import path, including their members and aliases.

import * as Matcher from "@typed/router/Matcher";

Candidate guards

  • GuardError

    type-alias

    Extracts a Guard’s typed failure channel.

  • GuardOutput

    type-alias

    Extracts the successful narrowed value produced by a Guard.

  • GuardServices

    type-alias

    Extracts the Effect services required by a Guard.

Guard contracts

  • AsGuard

    interface · Re-export

    An object that supplies a Guard through an own callable asGuard property. Use an instance field rather than a prototype method.

  • GuardInput

    type-alias · Re-export

    A Guard or an object that supplies one. Guard combinators accept either form.

  • GuardType

    type-alias · Re-export

    An effectful partial transformation.

    A successful Some contains a match, a successful None means the input did not match, and an Effect failure remains in the E channel. Required services remain in R.

Matcher composition

  • merge

    function

    Combines matcher case arrays in argument order.

Matcher contracts

  • Matcher

    interface

    Composes ordered route cases into an Fx that follows the current Navigation path.

  • Matcher.Any

    type-alias

    A Matcher with intentionally widened success, error, and service channels.

Matcher type inference

Route handlers

  • MatchHandler

    type-alias

    A route output or parameter-dependent output function.

  • MatchHandlerReturnValue

    type-alias

    The value, Effect, Stream, or Fx accepted as route output.

  • empty

    variable

    An immutable Matcher with no registered cases.

  • match

    variable

    The standalone route-registration function bound to empty.

Route layouts

  • Layout

    type-alias

    A function that wraps matched content using reactive params.

  • LayoutParams

    type-alias

    The reactive parameters and nested content supplied to a layout.

Route recovery

  • CatchHandler

    type-alias

    A reactive complete-cause handler that produces fallback Fx output.

  • catch

    variable · Re-export

    Handles the first typed failure from an Fx or Matcher.

  • catchCause

    variable

    Handles complete causes from an Fx or Matcher with a reactive Cause RefSubject.

  • catchTag

    variable

    Handles selected tagged failures and preserves unmatched variants.

  • catch_

    variable

    Handles the first typed failure from an Fx or Matcher.

  • redirectTo

    variable

    Retries a Matcher or Fx once after navigating on RouteNotFound.

    Prefer the fluent matcher.redirectTo(path) method when configuring a Matcher. This standalone form remains useful for inputs already expressed as Fx and for existing data-last pipelines.

Route services

  • AnyDependency

    type-alias

    A route dependency supplied as an Effect Layer or Context.

  • AnyLayer

    type-alias

    A widened Effect Layer accepted as a route dependency.

  • AnyServiceMap

    type-alias

    A widened Effect Context accepted as an already-built dependency.

  • DependencyError

    type-alias

    Extracts the acquisition error of a matcher Layer dependency.

  • DependencyProvided

    type-alias

    Extracts the services supplied by a matcher dependency.

  • DependencyRequirements

    type-alias

    Extracts the services needed to acquire a matcher Layer dependency.

  • normalizeDependencyInput

    function

    Normalizes one dependency or a dependency array to a single Effect Layer.

Selection errors

  • RouteDecodeError

    class · Re-export

    Reports route registration or parameter/query decoding failure.

  • RouteGuardError

    class · Re-export

    Reports that every decoded candidate’s guard failed or returned None.

  • RouteNotFound

    class · Re-export

    Reports that path lookup produced no registered candidate.

Type utilities

  • GuardType.Error

    type-alias · Re-export

    Extracts the typed error channel from a Guard or Guard adapter.

  • GuardType.Input

    type-alias · Re-export

    Extracts the accepted input type from a Guard or Guard adapter.

  • GuardType.Output

    type-alias · Re-export

    Extracts the matched output type from a Guard or Guard adapter.

  • GuardType.Services

    type-alias · Re-export

    Extracts the Effect service requirements from a Guard or Guard adapter.