microsoft / microsoft/TypeScript
Allow trailing commas in type arguments
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
TypeScript Version: 2.7.1
Search Terms: trailing comma template literal types generic
Code
class FooClass<
A,
B,
C,
> {
a: A;
b: B;
c: C;
}
const instance = new FooClass<
boolean,
number,
string, // [ts] Trailing comma not allowed.
>();
Expected behavior:
No errors as of #16152's resolution.
Actual behavior:
Trailing comma not allowed.
Related Issues:
#16152. @samal84 mentioned something like this but I couldn't parse what they meant without a code sample (is this it?). I'll take I can, if this is approved, take a stab at removing this error too.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided FooClass example with typescript@next and review the related discussion in #16152. The work is done when trailing commas in type arguments no longer produce an error and coverage exists for the shown case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100