|
|
|
|
|
by watermelon0
1759 days ago
|
|
Personally, I gave up on io-ts due to FP complications, and use suretype instead. In my case, where I was parsing HTTP request body, it just simplifies the code, if I can call a single function, get back validated object of the expected type, or throw an exception if there is a problem. Global request handler takes care of catching validation exception, and returning back user friendly error on what field(s) failed validation. |
|