From 54908f63453e4f16a185a376e67be8efa34b1681 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 9 Dec 2017 14:41:47 -0800 Subject: [PATCH] Allowed trailing commas in type parameter/argument lists 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 4f91262497382..a3f240e8d5a70 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -25545,10 +25545,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 ac20e826969ec..0000000000000 --- 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