Skip to content

Commit 0e76a82

Browse files
committed
Fix the incorrect error reporting and declaration file emit for the type parameter constraint of private methods
Also incorporates code review feedback
1 parent 9fd95fc commit 0e76a82

8 files changed

+181
-99
lines changed

src/compiler/diagnosticInformationMap.generated.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -105,22 +105,22 @@ module ts {
105105
Extends_clause_of_exported_class_0_has_or_is_using_name_1_from_private_module_2: { code: 2021, category: DiagnosticCategory.Error, key: "Extends clause of exported class '{0}' has or is using name '{1}' from private module '{2}'." },
106106
Implements_clause_of_exported_class_0_has_or_is_using_name_1_from_private_module_2: { code: 2022, category: DiagnosticCategory.Error, key: "Implements clause of exported class '{0}' has or is using name '{1}' from private module '{2}'." },
107107
Extends_clause_of_exported_interface_0_has_or_is_using_name_1_from_private_module_2: { code: 2023, category: DiagnosticCategory.Error, key: "Extends clause of exported interface '{0}' has or is using name '{1}' from private module '{2}'." },
108-
TypeParameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 2208, category: DiagnosticCategory.Error, key: "TypeParameter '{0}' of constructor signature from exported interface has or is using private name '{1}'." },
109-
TypeParameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 2209, category: DiagnosticCategory.Error, key: "TypeParameter '{0}' of call signature from exported interface has or is using private name '{1}'." },
110-
TypeParameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: { code: 2210, category: DiagnosticCategory.Error, key: "TypeParameter '{0}' of public static method from exported class has or is using private name '{1}'." },
111-
TypeParameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: { code: 2211, category: DiagnosticCategory.Error, key: "TypeParameter '{0}' of public method from exported class has or is using private name '{1}'." },
112-
TypeParameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 2212, category: DiagnosticCategory.Error, key: "TypeParameter '{0}' of method from exported interface has or is using private name '{1}'." },
113-
TypeParameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 2213, category: DiagnosticCategory.Error, key: "TypeParameter '{0}' of exported function has or is using private name '{1}'." },
114-
TypeParameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 2214, category: DiagnosticCategory.Error, key: "TypeParameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'." },
115-
TypeParameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 2215, category: DiagnosticCategory.Error, key: "TypeParameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'." },
116-
TypeParameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 2216, category: DiagnosticCategory.Error, key: "TypeParameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'." },
117-
TypeParameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 2217, category: DiagnosticCategory.Error, key: "TypeParameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'." },
118-
TypeParameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 2218, category: DiagnosticCategory.Error, key: "TypeParameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'." },
119-
TypeParameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 2219, category: DiagnosticCategory.Error, key: "TypeParameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." },
120-
TypeParameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 2220, category: DiagnosticCategory.Error, key: "TypeParameter '{0}' of exported class has or is using private name '{1}'." },
121-
TypeParameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 2221, category: DiagnosticCategory.Error, key: "TypeParameter '{0}' of exported interface has or is using private name '{1}'." },
122-
TypeParameter_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 2222, category: DiagnosticCategory.Error, key: "TypeParameter '{0}' of exported class has or is using name '{1}' from private module '{2}'." },
123-
TypeParameter_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 2223, category: DiagnosticCategory.Error, key: "TypeParameter '{0}' of exported interface has or is using name '{1}' from private module '{2}'." },
108+
Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 2208, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'." },
109+
Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 2209, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'." },
110+
Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: { code: 2210, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'." },
111+
Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: { code: 2211, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of public method from exported class has or is using private name '{1}'." },
112+
Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 2212, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of method from exported interface has or is using private name '{1}'." },
113+
Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 2213, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported function has or is using private name '{1}'." },
114+
Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 2214, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'." },
115+
Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 2215, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'." },
116+
Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 2216, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'." },
117+
Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 2217, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'." },
118+
Type_parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 2218, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'." },
119+
Type_parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 2219, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." },
120+
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 2220, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
121+
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 2221, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
122+
Type_parameter_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 2222, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using name '{1}' from private module '{2}'." },
123+
Type_parameter_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 2223, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported interface has or is using name '{1}' from private module '{2}'." },
124124
new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: { code: 2068, category: DiagnosticCategory.Error, key: "'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead." },
125125
Multiple_constructor_implementations_are_not_allowed: { code: 2070, category: DiagnosticCategory.Error, key: "Multiple constructor implementations are not allowed." },
126126
A_class_may_only_implement_another_class_or_interface: { code: 2074, category: DiagnosticCategory.Error, key: "A class may only implement another class or interface." },

src/compiler/diagnosticMessages.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -414,67 +414,67 @@
414414
"category": "Error",
415415
"code": 2023
416416
},
417-
"TypeParameter '{0}' of constructor signature from exported interface has or is using private name '{1}'.": {
417+
"Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'.": {
418418
"category": "Error",
419419
"code": 2208
420420
},
421-
"TypeParameter '{0}' of call signature from exported interface has or is using private name '{1}'.": {
421+
"Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'.": {
422422
"category": "Error",
423423
"code": 2209
424424
},
425-
"TypeParameter '{0}' of public static method from exported class has or is using private name '{1}'.": {
425+
"Type parameter '{0}' of public static method from exported class has or is using private name '{1}'.": {
426426
"category": "Error",
427427
"code": 2210
428428
},
429-
"TypeParameter '{0}' of public method from exported class has or is using private name '{1}'.": {
429+
"Type parameter '{0}' of public method from exported class has or is using private name '{1}'.": {
430430
"category": "Error",
431431
"code": 2211
432432
},
433-
"TypeParameter '{0}' of method from exported interface has or is using private name '{1}'.": {
433+
"Type parameter '{0}' of method from exported interface has or is using private name '{1}'.": {
434434
"category": "Error",
435435
"code": 2212
436436
},
437-
"TypeParameter '{0}' of exported function has or is using private name '{1}'.": {
437+
"Type parameter '{0}' of exported function has or is using private name '{1}'.": {
438438
"category": "Error",
439439
"code": 2213
440440
},
441-
"TypeParameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'.": {
441+
"Type parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'.": {
442442
"category": "Error",
443443
"code": 2214
444444
},
445-
"TypeParameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'.": {
445+
"Type parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'.": {
446446
"category": "Error",
447447
"code": 2215
448448
},
449-
"TypeParameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'.": {
449+
"Type parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'.": {
450450
"category": "Error",
451451
"code": 2216
452452
},
453-
"TypeParameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'.": {
453+
"Type parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'.": {
454454
"category": "Error",
455455
"code": 2217
456456
},
457-
"TypeParameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'.": {
457+
"Type parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'.": {
458458
"category": "Error",
459459
"code": 2218
460460
},
461-
"TypeParameter '{0}' of exported function has or is using name '{1}' from private module '{2}'.": {
461+
"Type parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'.": {
462462
"category": "Error",
463463
"code": 2219
464464
},
465-
"TypeParameter '{0}' of exported class has or is using private name '{1}'.": {
465+
"Type parameter '{0}' of exported class has or is using private name '{1}'.": {
466466
"category": "Error",
467467
"code": 2220
468468
},
469-
"TypeParameter '{0}' of exported interface has or is using private name '{1}'.": {
469+
"Type parameter '{0}' of exported interface has or is using private name '{1}'.": {
470470
"category": "Error",
471471
"code": 2221
472472
},
473-
"TypeParameter '{0}' of exported class has or is using name '{1}' from private module '{2}'.": {
473+
"Type parameter '{0}' of exported class has or is using name '{1}' from private module '{2}'.": {
474474
"category": "Error",
475475
"code": 2222
476476
},
477-
"TypeParameter '{0}' of exported interface has or is using name '{1}' from private module '{2}'.": {
477+
"Type parameter '{0}' of exported interface has or is using name '{1}' from private module '{2}'.": {
478478
"category": "Error",
479479
"code": 2223
480480
},

0 commit comments

Comments
 (0)