type-alias / @typed/router/Parser

Parser.Any

A Parser whose output is intentionally widened to unknown.

Package version
1.0.0-beta.7
Category
Parser contracts
Since
1.0.0
Member of
Parser

Import

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

Access Parser.Any through the imported Parser export. Its declaration below describes the member.

Signatures

type Any = Parser<unknown>;

Why

Heterogeneous combinators can constrain parser shape without inventing an output type.

Ownership and lifetime

TypeScript instantiates Any while parsing a string-literal input; partial results and unconsumed text exist only in the resulting type.

Source