variable / @typed/router/Matcher

match

The standalone route-registration function bound to empty.

Package version
1.0.0-beta.7
Category
Route handlers
Since
1.0.0

Import

import { match } from "@typed/router/Matcher";

Signatures

export declare const match: Matcher<never>["match"];

Why

Functional composition gets the same overloads and ordering semantics as Matcher.match.

Ownership and lifetime

Calling the bound function only allocates a Matcher case value. Handler, guard, Layer, and layout resources remain dormant until that Matcher runs.

Examples

import * as Router from "@typed/router"

const home = Router.match(Router.Parse("/"), "home")

Other public imports

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

Source