洪 民憙 (Hong Minhee) :nonbinary:'s avatar
洪 民憙 (Hong Minhee) :nonbinary:

@hongminhee@hollo.social · Reply to Mike Roberts's post

@mikebroberts Zod's a solid choice! The transform stuff can be tricky at first but becomes second nature.

Let me know if you end up trying Optique—always curious to hear feedback.

Mike Roberts's avatar
Mike Roberts

@mikebroberts@hachyderm.io · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post

@hongminhee I'm using transforms in a couple of places for very basic things (e.g. JSON from string). The problem I had was that when errors are possible the error handling in a transform is much less clean - to me - than if you're just writing “normal" TS, because of the context requirement. So for now I'm using just a TS function when going from known type to known type.