I am interested in defining a Type Definition that adheres to this function:
var a : MyInterface = function(func : <T>(t: T) => number) {
console.log("do Nothing");
return func(123) + " someString";
}
My goal is to create an Interface that accepts a function f that returns a number as a parameter and itself returns a string. From what I understand, the Interface should be structured like this.
interface MyInterface {
(func: (<T>(t: T) => number)) => string;
}
However, there is an issue with the final '=>' symbol causing it to show an error message ':' expected
.
If I remove the return type 'string', the compiler is content. How can I address this problem?