Closed martinschayna closed 1 year ago
The documentation clearly states that mapOutput
changes the return value of encode
not from decode
.
In your example: uppercase.encode("a") // ? "A"
Oh, I see, thank you. I am using io-ts
mainly for parsing responses from API, I always use decode
and obviously ignore the other side of codecs. My fault.
🐛 Bug report
Current Behavior
What I'm doing wrong? I've tried several examples of
mapOutput
from documentation and resolved issues here, but all of them seams to be wrong too.Expected behavior
Suggested solution(s)
I've tried to put log into the function in second argument, but it was never called. It should be called when the codec in the first argument parses input.
Your environment