DEV Community

Discussion on: Encoding HKTs in TS4.1

Collapse
 
mateiadrielrafael profile image
Matei Adriel

Nr 2 was solved by recent ts versions and 3 is a problem with type inference in ts in general (eg: I have similar issues w fp-ts)

Nr 1 can be avoided as long as you don't use the ts equivalent of rank n types (which seems like a fair cost for the simplicity of the implementation)

But fp-ts does it the long way, so what do I know

Thread Thread
 
mikearnaldi profile image
Michael Arnaldi • Edited

Nr 1 can be avoided as long as you don't use the ts equivalent of rank n types (which seems like a fair cost for the simplicity of the implementation).

If that is your objective yes, you can probably simplify it further.

In that encoding I still don't find how to make transformers work like:
github.com/Matechs-Garage/matechs-...

Personally I prefer making the low level implementation complex (as it does not target user-land code) and provide more features that works smoothly.