Open jleider opened 2 years ago
That curry
function is not type safe (as well as compose
) Playground. fp-ts
had them, but then they were removed because of this issue, so I don't think they would be welcome here.
Hello people! Thanks for mentioning my fun experiment here.
I totally agree with @DenisFrezzato about my functions not being type-safe; this issue of his is absolutely valid and I don't have a solution to broken generics as of now. I also don't know if it's even possible to have my types work when generic functions are supplied to them, but will take some time and think about it.
This is a relevant typescript issue for who's interested.
🚀 Feature request
@drizzer14 has put together a really cool feature that seems like it would be a great addition to fp-ts.
https://v10i.dev/p/auto-currying-in-typescript
The one downside is it requires TS v4.2.2+ which the current 2.x line only supports 3.5+
Current Behavior
There isn't one that I am aware of.
Who does this impact? Who is this for?
Anyone wanting to curry a 2+-ary function.
Your environment