type-alias / @typed/router/Matcher

Matcher.Error

Extracts a Matcher’s declared error type.

Package version
1.0.0-beta.13
Category
Matcher type inference
Since
1.0.0
Member of
Matcher

Import

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

Access Matcher.Error through the imported Matcher export. Its declaration below describes the member.

Signatures

type Error<T> = [
    T
] extends [
    Matcher<infer _A, infer E, infer _R>
] ? E : never;

Why

Router builders can transform errors without widening away individual variants.

Ownership and lifetime

Computed only by TypeScript; it does not retain a Matcher or any failure value.

Other public imports

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

Source