5to6
5to6 copied to clipboard
Classes
It would be great if we could transpile constructor functions to classes.
Convert this:
function Fuu(fuu) {
this.fuu = fuu;
}
Fuu.prototype.bar = function(arg) {
console.log(arg);
}
Into this:
class Fuu {
constuctor(fuu) {
this.fuu = fuu;
}
bar(arg) {
console.log(arg);
}
}