Skip to content

Commit e5a83ba

Browse files
committed
Merge pull request #412 from Microsoft/exportImport
Check for the accessible symbol from exported import
2 parents 54f5f15 + 1454e33 commit e5a83ba

File tree

59 files changed

+3622
-829
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+3622
-829
lines changed

src/compiler/checker.ts

Lines changed: 134 additions & 35 deletions
Large diffs are not rendered by default.

src/compiler/diagnosticInformationMap.generated.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ module ts {
156156
Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 2065, category: DiagnosticCategory.Error, key: "Return type of public method from exported class has or is using name '{0}' from private module '{1}'." },
157157
Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 2066, category: DiagnosticCategory.Error, key: "Return type of method from exported interface has or is using name '{0}' from private module '{1}'." },
158158
Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1: { code: 2067, category: DiagnosticCategory.Error, key: "Return type of exported function has or is using name '{0}' from private module '{1}'." },
159+
Import_declaration_0_is_using_private_name_1: { code: 2181, category: DiagnosticCategory.Error, key: "Import declaration '{0}' is using private name '{1}'." },
159160
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}'." },
160161
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}'." },
161162
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}'." },
@@ -230,6 +231,18 @@ module ts {
230231
A_parameter_property_is_only_allowed_in_a_constructor_implementation: { code: 2246, category: DiagnosticCategory.Error, key: "A parameter property is only allowed in a constructor implementation." },
231232
Function_overload_must_be_static: { code: 2247, category: DiagnosticCategory.Error, key: "Function overload must be static." },
232233
Function_overload_must_not_be_static: { code: 2248, category: DiagnosticCategory.Error, key: "Function overload must not be static." },
234+
Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 2249, category: DiagnosticCategory.Error, key: "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named." },
235+
Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 2250, category: DiagnosticCategory.Error, key: "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named." },
236+
Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 2251, category: DiagnosticCategory.Error, key: "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named." },
237+
Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 2252, category: DiagnosticCategory.Error, key: "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named." },
238+
Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 2253, category: DiagnosticCategory.Error, key: "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named." },
239+
Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 2254, category: DiagnosticCategory.Error, key: "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named." },
240+
Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 2255, category: DiagnosticCategory.Error, key: "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named." },
241+
Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 2256, category: DiagnosticCategory.Error, key: "Return type of public static property getter from exported class has or is using name '{0}' from external module {1} but cannot be named." },
242+
Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 2257, category: DiagnosticCategory.Error, key: "Return type of public property getter from exported class has or is using name '{0}' from external module {1} but cannot be named." },
243+
Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 2258, category: DiagnosticCategory.Error, key: "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named." },
244+
Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 2259, category: DiagnosticCategory.Error, key: "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named." },
245+
Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 2260, category: DiagnosticCategory.Error, key: "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named." },
233246
Circular_definition_of_import_alias_0: { code: 3000, category: DiagnosticCategory.Error, key: "Circular definition of import alias '{0}'." },
234247
Cannot_find_name_0: { code: 3001, category: DiagnosticCategory.Error, key: "Cannot find name '{0}'." },
235248
Module_0_has_no_exported_member_1: { code: 3002, category: DiagnosticCategory.Error, key: "Module '{0}' has no exported member '{1}'." },

src/compiler/diagnosticMessages.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,10 @@
616616
"category": "Error",
617617
"code": 2067
618618
},
619+
"Import declaration '{0}' is using private name '{1}'.": {
620+
"category": "Error",
621+
"code": 2181
622+
},
619623
"Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'.": {
620624
"category": "Error",
621625
"code": 2208
@@ -912,6 +916,54 @@
912916
"category": "Error",
913917
"code": 2248
914918
},
919+
"Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.": {
920+
"category": "Error",
921+
"code": 2249
922+
},
923+
"Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.": {
924+
"category": "Error",
925+
"code": 2250
926+
},
927+
"Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named.": {
928+
"category": "Error",
929+
"code": 2251
930+
},
931+
"Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named.": {
932+
"category": "Error",
933+
"code": 2252
934+
},
935+
"Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named.": {
936+
"category": "Error",
937+
"code": 2253
938+
},
939+
"Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named.": {
940+
"category": "Error",
941+
"code": 2254
942+
},
943+
"Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named.": {
944+
"category": "Error",
945+
"code": 2255
946+
},
947+
"Return type of public static property getter from exported class has or is using name '{0}' from external module {1} but cannot be named.": {
948+
"category": "Error",
949+
"code": 2256
950+
},
951+
"Return type of public property getter from exported class has or is using name '{0}' from external module {1} but cannot be named.": {
952+
"category": "Error",
953+
"code": 2257
954+
},
955+
"Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named.": {
956+
"category": "Error",
957+
"code": 2258
958+
},
959+
"Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named.": {
960+
"category": "Error",
961+
"code": 2259
962+
},
963+
"Return type of exported function has or is using name '{0}' from external module {1} but cannot be named.": {
964+
"category": "Error",
965+
"code": 2260
966+
},
915967
"Circular definition of import alias '{0}'.": {
916968
"category": "Error",
917969
"code": 3000

0 commit comments

Comments
 (0)