typed-typings / npm-ramda

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

R.map has error "is not assignable to parameter of type 'Morphism<any, {}>' #392

Closed tomzaku closed 6 years ago

tomzaku commented 6 years ago
const a = [1,2,3]
const aC = R.map((value: number, key: number): number => value * 2)

Error:

[ts] Argument of type '(module: any, moduleKey: string) => {}' is not assignable to parameter of type 'Morphism<any, {}>'
'.

Version:

ts-node v6.0.5
node v8.9.4
typescript v2.8.3
ikatyang commented 6 years ago

Hi, there's only 1 parameter in the map fn, if you'd like to use the index parameter, addIndex should be what you're looking for.