This works fine AFAIK:
(function f() {
console.log(f.name); //logs f
})();
But some of the answers posted here are a lot longer, which makes me think that I might be missing a gotcha (In other words it works in this case, BUT ...) with the above statement?
Here's a slightly different typescript variation:
function f1() {}
function f2(f:Function) {
console.log(f.name);
}
f2(f1);