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 comma on tuple types. #28893

Closed
cakoose opened this issue Dec 7, 2018 · 1 comment
Closed

Allow trailing comma on tuple types. #28893

cakoose opened this issue Dec 7, 2018 · 1 comment
Labels
Committed The team has roadmapped this issue Good First Issue Well scoped, documented and has the green light Help Wanted You can do this Suggestion An idea for TypeScript

Comments

@cakoose
Copy link

cakoose commented Dec 7, 2018

type Point = [
    number,
    number,  // error: trailing comma not allowed
];

const point = [
    1,
    2,
];

Is there a reason the trailing comma isn't allowed in tuple types?

@DanielRosenwasser DanielRosenwasser added Suggestion An idea for TypeScript In Discussion Not yet reached consensus Help Wanted You can do this Committed The team has roadmapped this issue Good First Issue Well scoped, documented and has the green light and removed In Discussion Not yet reached consensus labels Dec 7, 2018
@DanielRosenwasser
Copy link
Member

Thanks @a-tarasyuk!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Committed The team has roadmapped this issue Good First Issue Well scoped, documented and has the green light Help Wanted You can do this Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants