google / closure-compiler

A JavaScript checker and optimizer.
https://developers.google.com/closure/compiler/
Apache License 2.0
7.4k stars 1.15k forks source link

Allow trailing comma at the end of a param list #2552

Closed MatrixFrog closed 7 years ago

MatrixFrog commented 7 years ago

I missed that this had been added to the spec, I guess.

https://jsconsole.com/?function%20f(x%2C%20y%2C%20)%20%7B%7D works at least in Chrome 59. Should be a pretty easy fix.

MatrixFrog commented 7 years ago

It looks like this moved to stage 4 almost a year ago https://github.com/tc39/proposal-trailing-function-commas/commit/8318eda8605b88a7f84cb37b268179b3accf46e1 so I'm not sure if it's in the 2016 or 2017 language mode

ChadKillingsworth commented 7 years ago

@MatrixFrog 2017 - https://github.com/tc39/proposals/blob/master/finished-proposals.md

concavelenz commented 7 years ago

This seems like a nice summary of what version added what: https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_Next_support_in_Mozilla