fantasyland / static-land

Specification for common algebraic structures in JavaScript based on Fantasy Land
MIT License
772 stars 41 forks source link

Static-land-based Higher-Kinded-Type encoding for TypeScript #59

Closed TylorS closed 4 years ago

TylorS commented 4 years ago

👋 I've been playing around with a HKT encoding for TypeScript, and it is my goal to have it match quite closely to the Static-Land specification. I was generally hoping to solicit some feedback to make sure I'm not doing anything obviously wrong. If this is the wrong place to ask just let me know where would be appropriate.

This encoding only works for TypeScript 4.x, which at the time of this writing is available at typescript@next and is not considered stable. However, with it's feature-set including variadic tuples, it enables some interesting features and that makes the use of HKTs in TS a bit easier over existing solutions.

Here's the link to the library https://github.com/TylorS/hkt-ts, and thank you in advance!