Import
import type { Result } from "@typed/router/Parser";Signatures
export type Result<Value, Rest extends string> = readonly [
value: Value,
rest: Rest
];Why
Every parser can compose without hiding partial consumption.
Ownership and lifetime
Result is a compile-time tuple contract; neither the parsed value nor remaining-input type creates a runtime allocation.
Examples
import type { Parse, Parser } from "@typed/router/Parser"
type Parsed = Parse<Parser.String<"users">, "users/42">
// readonly ["users", "/42"]