# Parser.TakeWhileInternal

Recursively consumes an allowed character prefix at the type level.

## Signatures

```ts
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.
