I am facing a challenge in converting an existing JavaScript code to Typescript. The original javascript code is as follows:
object.getsomething( function(err, result) {
// async
});
I am confused about how to properly type the parameter "function(err,result)
".
My attempt at typing it was
retrieve(func: function(err:string, result:string) : any){}
However, my code editor's intellisense indicates that "err" and "result" cannot be found. Additionally, I couldn't find any documentation on the "function" type.