typed-typings / npm-ramda

TypeScript's type definitions for Ramda
MIT License
384 stars 64 forks source link

How should we type lift? #442

Open robounohito opened 5 years ago

robounohito commented 5 years ago

Hi guys,

Can someone explain how lift typings suppose to work?

Even basic case not working:

const test = lift(add)(inc, dec)(2);

lift correctly infers arity 2 (<number, number, number>), but then it fails to typecheck with:

Argument of type 'inc_0' is not assignable to parameter of type 'List<number>'

For whatever reason it expects inc and dec to return List<number> instead of number.