You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import*asttfrom"io-ts-types";import*astfrom"io-ts";import{pipe}from"fp-ts/function";constPremium=t.type({premium: tt.withFallback(t.literal(true),true),});constFree=t.type({premium: tt.withFallback(t.literal(false),false),});constUnion=t.union([Free,Premium]);constz={};pipe(z,Free.decode,console.log);// Right ✅pipe(z,Union.decode,console.log);// Left ❌
Expected behavior
See code comments above.
If Free.decode(z) returns a Right then I believe Union.decode(z) should also return a Right?
🐛 Bug report
Current Behavior
Expected behavior
See code comments above.
If
Free.decode(z)
returns aRight
then I believeUnion.decode(z)
should also return aRight
?Reproducible example
Suggested solution(s)
Additional context
Your environment
package.json
:The text was updated successfully, but these errors were encountered: