Handle error when type parameter of mapped type uses private type

Fixes #30201
This commit is contained in:
Sheetal Nandi
2019-03-06 13:30:48 -08:00
parent d2364f555f
commit fe9f42480a
7 changed files with 77 additions and 0 deletions
+4
View File
@@ -2927,6 +2927,10 @@
"category": "Error",
"code": 4102
},
"Type parameter '{0}' of exported mapped object type is using private name '{1}'.": {
"category": "Error",
"code": 4103
},
"The current host does not support the '{0}' option.": {
"category": "Error",
@@ -391,6 +391,10 @@ namespace ts {
diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1;
break;
case SyntaxKind.MappedType:
diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1;
break;
case SyntaxKind.ConstructorType:
case SyntaxKind.ConstructSignature:
diagnosticMessage = Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;