> I do wish that Typescript would offer some tools to make it more ergonomic to write performant unifying code (I kind of despise conditional types
Maybe give https://gcanti.github.io/fp-ts/ a go?
Maybe give https://gcanti.github.io/fp-ts/ a go?
I really think that TS itself should offer syntax more or less matching what that lib does at the type level, but this is a bit of a maximalist request.
As for fp-ts all APIs have examples/tests that show their usage.
It’s possible there are other aspects of the APIs that differ in meaningful ways, but last I checked virtually all of the libraries with similar functionality (and there are many) have roughly the same concepts until your schemas themselves get deeply complex.
It’s not a very full featured Result, but you can wrap it with your own type.