Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow trailing commas in function parameter and argument lists #8942

Merged
5 commits merged into from
Jun 7, 2016

Conversation

ghost
Copy link

@ghost ghost commented Jun 2, 2016

Fixes #7279

If this is pulled we should close #7747 too.

@ghost ghost force-pushed the param_trailing_commas branch from c8c6503 to 4281bf5 Compare June 2, 2016 15:18
@mhegazy
Copy link
Contributor

mhegazy commented Jun 2, 2016

can you also add a test for trailing commas after a rest arg.

@mhegazy
Copy link
Contributor

mhegazy commented Jun 2, 2016

👍

@ghost
Copy link
Author

ghost commented Jun 6, 2016

Need review on 2fc2f5c

@mhegazy
Copy link
Contributor

mhegazy commented Jun 6, 2016

looks good.

@mhegazy
Copy link
Contributor

mhegazy commented Jun 6, 2016

i would also add a test for getters, setters, call and construct signatures.

tests/cases/conformance/es7/trailingCommasInFunctionParametersAndArguments.ts(20,11): error TS1138: Parameter declaration expected.


==== tests/cases/conformance/es7/trailingCommasInFunctionParametersAndArguments.ts (1 errors) ====
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's weird, I wasn't expecting to see a .errors.txt and a .types. Usually they are mutually exclusive. Did the .types file manage to skip the broken getter/setter pair?

@sandersn
Copy link
Member

sandersn commented Jun 6, 2016

👍

@ghost ghost merged commit 849ab7c into master Jun 7, 2016
@ghost ghost deleted the param_trailing_commas branch June 7, 2016 14:35
@mhegazy mhegazy mentioned this pull request Jun 7, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trailing Commas in Function Param Lists
3 participants