For a project, I would to separate Implementation of a function and the call of this function.
It's something like this:
function identity<T, R>(arg: T): R {
return { result: arg };
}
const test = identity<string, { result: string }>;
console.log(test('test'))
I got this error: "test is not a function"
Is there a way to perform type hinting like this?
Thanks