Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
console.clear();
class A{
  @FunctionName
   test(){
     
    
   }
   
   testCall(fnc:Function){
      console.log(fnc.functionName); // i want it display test here not only empty
     console.log(fnc.name); // i want it display test here not only empty
     console.dir(fnc);
    
   }
}
var a=new A();
a.testCall(a.test);
function FunctionName(target:any, key:string) {
  console.log("target"+target);
  console.log("key"+key);
  target[key].functionName = key;
}
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
windwppro
0viewers