5to6 icon indicating copy to clipboard operation
5to6 copied to clipboard

Classes

Open olanod opened this issue 10 years ago • 0 comments

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);
    }
}

olanod avatar May 28 '15 18:05 olanod