I'm currently using Redux-saga and typescript. But I don't know how to use call effect with generic function type in Typescript.
For eg. I have a function with generic type like this:
function identity<T>(arg: T): T {
return arg;
}
And, in saga, I expect the code like this:
...
const result = yield call(identity<string>, "myString")
...
However the compiler shows errors. Of course, I can write
const result = yield call(identity, "myString")
But it's not my expectation. How can I know is there any way/syntax to satisfies my above expectation?