Is there a way to distinguish between the following three elements in ES6 using its reference?
let x = i => i+1;
class y { constructor(i) { this._i=i+1; } get i(){ return this._i;} }
function z(i) { return i+1; }
For example:
test(x) //=> 'arrow'
test(y) //=> 'class'
test(z) //=> 'function'
Also, how do I differentiate between these elements in transpilers like Traceur or Babel?