variable / @typed/router/Route

Wildcard

A Route that captures an unconstrained remainder.

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

Import

import { Wildcard } from "@typed/router/Route";

Signatures

export declare const Wildcard: Route<"*", Schema.Codec<{
    readonly "*": string;
}, {
    readonly "*": string;
}, never, never>>;

Why

Catch-all matching is explicit and can be ordered after constrained routes.

Ownership and lifetime

Wildcard constructs its Route immediately. The Route retains the supplied AST or route values and lazily memoizes derived paths and Codecs; Codec services are required only when decoding or encoding runs.

Other public imports

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

Source