fix(47056): report errors for all properties with errors (#47057)

This commit is contained in:
Oleksandr T
2021-12-16 22:58:15 +02:00
committed by GitHub
parent 270b0d1c73
commit 93bdfd2511
6 changed files with 70 additions and 2 deletions

View File

@@ -43089,7 +43089,7 @@ namespace ts {
if (prop.kind === SyntaxKind.ShorthandPropertyAssignment && !inDestructuring && prop.objectAssignmentInitializer) {
// having objectAssignmentInitializer is only valid in ObjectAssignmentPattern
// outside of destructuring it is a syntax error
return grammarErrorOnNode(prop.equalsToken!, Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern);
grammarErrorOnNode(prop.equalsToken!, Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern);
}
if (name.kind === SyntaxKind.PrivateIdentifier) {