Import
import { Parser } from "@typed/router/Parser";Access Parser.TakeWhileInternal through the imported Parser export. Its declaration below describes the member.
Signatures
type TakeWhileInternal<Input extends string, Allowed extends string, Acc extends string = ""> = Input extends `${infer Head}${infer Tail}` ? Head extends Allowed ? TakeWhileInternal<Tail, Allowed, `${Acc}${Head}`> : readonly [
Acc,
Input
] : readonly [
Acc,
Input
];Why
The public TakeWhile combinator preserves both the accumulated prefix and exact remainder.
Ownership and lifetime
TypeScript recursively instantiates TakeWhileInternal while characters remain allowed. Its
accumulator and remainder are erased after type checking.