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

Allowed trailing commas in type argument lists for type references #25877

Closed
brainkim opened this issue Jul 23, 2018 · 4 comments
Closed

Allowed trailing commas in type argument lists for type references #25877

brainkim opened this issue Jul 23, 2018 · 4 comments
Labels
Duplicate An existing issue was already created

Comments

@brainkim
Copy link

brainkim commented Jul 23, 2018

TypeScript Version: 3.1.0-dev.201xxxxx

Search Terms:
Trailing Comma Nested Types Parameters Generic

Code:

interface Pizza<T> {
  pizza: T;
}

type PizzaBox = Partial<Pizza<string,>>;

Expected behavior:
An error should not be thrown
Actual behavior:

pizza.ts:5:37 - error TS1009: Trailing comma not allowed.

5 type PizzaBox = Partial<Pizza<string,>>;

Playground Link:
http://www.typescriptlang.org/play/index.html#src=interface%20Pizza%3CT%3E%20%7B%0D%0A%20%20pizza%3A%20T%3B%0D%0A%7D%0D%0A%0D%0Atype%20PizzaBox%20%3D%20Partial%3CPizza%3Cstring%2C%3E%3E%3B
Related Issues:
#16152
#21984
#20599

@mhegazy mhegazy changed the title Allowed trailing commas in NESTED type parameter/argument lists Allowed trailing commas in type argument lists for type references Jul 23, 2018
@mhegazy
Copy link
Contributor

mhegazy commented Jul 23, 2018

Do not think nesting has any thing to do with this. it is the type reference that is not allowed. related to #21984

@mhegazy mhegazy added Suggestion An idea for TypeScript Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature labels Jul 23, 2018
@mhegazy
Copy link
Contributor

mhegazy commented Jul 23, 2018

Actually, i would just call this a duplicate of #21984

@mhegazy mhegazy added Duplicate An existing issue was already created and removed Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript labels Jul 23, 2018
@brainkim
Copy link
Author

@mhegazy You would know better!

@typescript-bot
Copy link
Collaborator

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants