-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Trailing Commas in Function Param Lists #7279
Copy link
Copy link
Closed
Labels
CommittedThe team has roadmapped this issueThe team has roadmapped this issueES NextNew featurers for ECMAScript (a.k.a. ESNext)New featurers for ECMAScript (a.k.a. ESNext)FixedA PR has been merged for this issueA PR has been merged for this issueHelp WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Metadata
Metadata
Assignees
Labels
CommittedThe team has roadmapped this issueThe team has roadmapped this issueES NextNew featurers for ECMAScript (a.k.a. ESNext)New featurers for ECMAScript (a.k.a. ESNext)FixedA PR has been merged for this issueA PR has been merged for this issueHelp WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScript
https://jeffmo.github.io/es-trailing-function-commas/
This proposal is Stage 3 according to https://github.com/tc39/ecma262, so seems like its at an appropriate stability for TypeScript team to implement it.
This would allow function definitions and calls in the following style:
Benefits: https://github.com/jeffmo/es-trailing-function-commas/blob/master/proposal_presentation_slides.pdf
In addition to all of the above, I suspect the extra "verbosity" of TypeScript's inline types makes this feature even more attractive in TypeScript than in vanilla JS. I feel this particularly in class constructors, which can also have
privateannotations, and possibly areadonlyannotation coming down the pipe.