From 131cf4714cbbe03c7b359eb6c4b257df3c74803f Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Thu, 4 Jan 2018 19:54:51 -0500 Subject: [PATCH] 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!? --- src/compiler/checker.ts | 4 ---- .../typeParameterListWithTrailingComma1.errors.txt | 8 -------- 2 files changed, 12 deletions(-) delete mode 100644 tests/baselines/reference/typeParameterListWithTrailingComma1.errors.txt diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 0fbe3358ce..5321baf2bc 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -25736,10 +25736,6 @@ namespace ts { } function checkGrammarTypeParameterList(typeParameters: NodeArray, 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; diff --git a/tests/baselines/reference/typeParameterListWithTrailingComma1.errors.txt b/tests/baselines/reference/typeParameterListWithTrailingComma1.errors.txt deleted file mode 100644 index ac20e82696..0000000000 --- a/tests/baselines/reference/typeParameterListWithTrailingComma1.errors.txt +++ /dev/null @@ -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 { - ~ -!!! error TS1009: Trailing comma not allowed. - } \ No newline at end of file