I have a function that should have a generic parameter, like this:
async function getAll<T>(model: Model<T>, limit = 10) {
....
}
So I decided to call this function using lodash curry:
const specificGetAll = curry(getAll)(model)
specificGetAll(10)
This results in a "This expression is not callable. Type '' has no call signatures."
Two questions arise from this:
- Is currying the right thing to do here (e.g. compare with ts decorator)?
- What causes this error, and how can it be fixed?