Fixed crash when reporting infer extends on invalid name with declaration (#52032)

This commit is contained in:
Josh Goldberg
2023-01-10 16:11:24 -05:00
committed by GitHub
parent 94afa32925
commit 67cdaf9215
8 changed files with 42 additions and 0 deletions

View File

@@ -3864,6 +3864,10 @@
"category": "Error",
"code": 4084
},
"Extends clause for inferred type '{0}' has or is using private name '{1}'.": {
"category": "Error",
"code": 4085
},
"Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict.": {
"category": "Error",
"code": 4090

View File

@@ -500,6 +500,10 @@ export function createGetSymbolAccessibilityDiagnosticForNode(node: DeclarationD
diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;
break;
case SyntaxKind.InferType:
diagnosticMessage = Diagnostics.Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1;
break;
case SyntaxKind.TypeAliasDeclaration:
diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1;
break;