r/javascript • • Apr 21 '20

Node.js v14 released

https://medium.com/@nodejs/node-js-version-14-available-now-8170d384567e
419 Upvotes

74 comments sorted by

View all comments

Show parent comments

2

u/csorfab Apr 22 '20

in what way would it change the semantics?

1

u/lesleh Apr 22 '20

It gets translated to this as ES6:

class Foo {
    constructor(bar) {
        this.bar = bar;
    }
}

2

u/csorfab Apr 22 '20

oh, I didn't know about this shorthand! Now I'm also wondering how babel handles this, although I'm guessing it transpiles it correctly. Only it doesn't make any type checks