mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 15:25:54 -06:00
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:
parent
85b32ed221
commit
131cf4714c
@ -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;
|
||||
|
||||
@ -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.
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user