Does anyone know how to retrieve the name of a function passed in as a parameter?
console.clear();
class A{
test(){
}
testCall(fnc:Function){
console.log(fnc.name); // I want it to display 'test' here, not empty
console.log(fnc);
}
}
var a=new A();
a.testCall(a.test);
You can try this out on jsbin http://jsbin.com/loluhu/edit?js,console