- flatten1<TToken, TOptions, TValue>(p: Matcher<TToken, TOptions, (TValue | TValue[])[]>): Matcher<TToken, TOptions, TValue[]>
-
Parameters
-
p: Matcher<TToken, TOptions, (TValue | TValue[])[]>
Returns Matcher<TToken, TOptions, TValue[]>
- flatten1<TToken, TOptions, TValue>(p: Parser<TToken, TOptions, (TValue | TValue[])[]>): Parser<TToken, TOptions, TValue[]>
-
Parameters
-
p: Parser<TToken, TOptions, (TValue | TValue[])[]>
Returns Parser<TToken, TOptions, TValue[]>
This overload makes a Matcher that flattens an array of values or value arrays returned by a given Matcher.
Implementation is based on map.