Module / v1.0.0-beta.13

@typed/router

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

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

Candidate execution

  • RouteExecutor

    interface · Re-export

    Transitions between decoded route candidates while retaining compatible mounted work.

  • RouteTransition

    interface · Re-export

    The path, raw input, candidate list, and ambient Layers for one route update.

  • makeRouteExecutor

    function · Re-export

    Creates a scoped executor for route candidate decoding and selection.

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

Parameter codecs

  • Int

    variable

    Constructs an integer path parameter decoded from a string.

  • Number

    variable

    Constructs a finite-number path parameter decoded from a string.

  • ParamWithSchema

    variable

    Constructs a named path parameter decoded by an Effect Schema Codec.

Route composition

  • Join

    type-alias

    Infers the normalized path, intersected decoded parameters, and codec services of joined Routes.

Route construction

  • Param

    variable

    Constructs a named string path-parameter Route.

  • Parse

    variable

    Parses a route-pattern string into a typed Route.

  • Slash

    variable

    The root slash Route.

  • Wildcard

    variable

    A Route that captures an unconstrained remainder.

  • make

    function

    Constructs a Route from a Route AST and lazily memoizes its path and schemas.

Route contracts

  • Route

    interface

    A pipeable route value containing syntax, normalized path, and Effect Schemas.

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.

Route type inference

  • Any

    type-alias

    A Route with intentionally widened path and schema parameters.

  • Params

    type-alias

    Combines decoded path and query parameter fields for a route string.

  • PathType

    type-alias

    Extracts the decoded path-only parameter record from a Route.

  • QueryType

    type-alias

    Extracts the decoded query-only parameter record from a Route.

  • Route.Any

    type-alias

    A Route with intentionally widened path and schema parameters.

  • Route.DecodingServices

    type-alias

    Extracts services required to decode a Route’s parameters.

  • Route.EncodingServices

    type-alias

    Extracts services required to encode a Route’s parameters.

  • Route.Params

    type-alias

    Combines decoded path and query parameter fields for a route string.

  • Route.Path

    type-alias

    Extracts the literal path string type from a Route.

  • Route.PathType

    type-alias

    Extracts the decoded path-only parameter record from a Route.

  • Route.QueryType

    type-alias

    Extracts the decoded query-only parameter record from a Route.

  • Route.Schema

    type-alias

    Extracts the combined parameter Codec from a Route.

  • Route.Type

    type-alias

    Extracts the decoded parameter type from a Route.

  • Type

    type-alias

    Extracts the decoded parameter type from a Route.

Router requirements

  • Router

    type-alias

    The service requirements shared by every Typed router runtime.

Runtime providers

  • BrowserRouter

    variable

    Builds a browser Router Layer over the platform History API.

  • ServerRouter

    variable

    Builds an SSR Router Layer from an in-memory history snapshot or initial URL.

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.

Structural mounts

  • CurrentRoute

    class

    The ambient route context for the current routing boundary.

  • CurrentRouteTree

    interface

    Describes the stable route mount tree visible to a running handler or layout.

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.