Just like oneOf but you have to specify the type parameter. Example: oneOfMany<TYPEPARAM>.
oneOfMany<TYPEPARAM>
The type inference is a bit worse on this function. In most cases you will have to specify the type parameter yourself.
const json: Parser<Json> = P.oneOfMany<Json>( P.float.map(JNumber), P.keyword("true").map(() => JBoolean(true)), P.keyword("false").map(() => JBoolean(false)), P.keyword("null").map(() => JNull)
oneOfMany
Rest
Just like oneOf but you have to specify the type parameter. Example:
oneOfMany<TYPEPARAM>
.Example
The type inference is a bit worse on this function. In most cases you will have to specify the type parameter yourself.
See
oneOfMany
but with different type inference.