Type alias PickParserType<T>

PickParserType<T>: HasCaptureParsers<T> extends true
    ? CaptureParser<MergedResults<T>, UnionOfCaptures<T>>
    : Parser<MergedResults<T>>

For a given array of GeneralParsers, if any of them is a CaptureParser, PickParserType says the array is an array of CaptureParsers, otherwise it's an array of Parsers. It also correctly merges the result and capture types. This is useful for a combinator like or which is not able to infer its return type correctly.

Type Parameters

Generated using TypeDoc