Interface DispatchPattern<TRoute, TMeans>

Routing dispatch pattern.

Declares a route handler to delegate request processing to when the route matches target pattern.

Type Parameters

  • TRoute extends PathRoute = URLRoute

    A type of supported route.

  • TMeans extends RouterMeans<TRoute> = RouterMeans<TRoute>

    A type of route processing means.

Hierarchy

  • DispatchPattern

Properties

Methods

Properties

on: string | RoutePattern<TRoute>

A route pattern that should match the route in order to dispatch processing the the handler.

When specified as a string, the pre-configured pattern parser is used to parse it.

to: RequestHandlerMethod<DispatchPattern<TRoute, TMeans>, TMeans>

A route handler to dispatch request processing to when the route matches the pattern.

This handler would receive a tail of the matching route.

Methods

  • Extracts route tail from matching route.

    The extracted route tail is passed to the handler.

    Parameters

    • context: RequestContext<TMeans>

      Route processing context of the matching route.

    Returns TRoute

    Extracted tail of the matching route.

    Default

    Extracts a matching route tail starting from the first capture/wildcard. If no captures or wildcards
    present in pattern, then full route extracted.

Generated using TypeDoc