Allowed trailing commas in type parameter/argument lists (#20599)

This change is only one source file and one error file... there must be something I'm missing!?
This commit is contained in:
Josh Goldberg 2018-01-04 19:54:51 -05:00 committed by Mohamed Hegazy
parent 85b32ed221
commit 131cf4714c
2 changed files with 0 additions and 12 deletions

View file

@ -25736,10 +25736,6 @@ namespace ts {
}
function checkGrammarTypeParameterList(typeParameters: NodeArray<TypeParameterDeclaration>, file: SourceFile): boolean {
if (checkGrammarForDisallowedTrailingComma(typeParameters)) {
return true;
}
if (typeParameters && typeParameters.length === 0) {
const start = typeParameters.pos - "<".length;
const end = skipTrivia(file.text, typeParameters.end) + ">".length;

View file

@ -1,8 +0,0 @@
tests/cases/compiler/typeParameterListWithTrailingComma1.ts(1,10): error TS1009: Trailing comma not allowed.
==== tests/cases/compiler/typeParameterListWithTrailingComma1.ts (1 errors) ====
class C<T,> {
~
!!! error TS1009: Trailing comma not allowed.
}