Decoder that returns the first alternative to succeed.
The output type is inferred as the union of the alternatives. Pass an explicit type argument when you want to state the target type instead.
oneOf([string(), number()]); // Decoder<string | number> Copy
oneOf([string(), number()]); // Decoder<string | number>
Decoder that returns the first alternative to succeed.
The output type is inferred as the union of the alternatives. Pass an explicit type argument when you want to state the target type instead.