Now i think that can get a curried version of this function
const S = require('sanctuary');
const getUserAuthenticated = S.curry2(getUser)("Bearer test")
So now i get use the getUserAuthenticated function and i can map it when i need to, but sadly i get a type error because the promise is not a correct type.
getUserAuthenticated(1).then(...)
TypeError: Unrecognized value
curry2 :: ((a, b) -> c) -> a -> b -> c
^
1
1) [object Promise] :: (no types)
The value at position 1 is not a member of any type in the environment.
The environment contains the following types:
- Function
- Arguments
- Array d
...
Hi guys,
i am in a condition that i cannot figure out.
I want to curry a function that will return a promise. Let suppose there is something like:
Now i think that can get a curried version of this function
So now i get use the
getUserAuthenticated
function and i can map it when i need to, but sadly i get a type error because the promise is not a correct type.Why there is a limitation with
curry
and types?Thanks Walter