You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a new flag for diagnostics 'isEarly' and disable emit if this flag is set. Set the flag by default on all let and const errors to ensure we are not emitting invalid JS code.
Copy file name to clipboardExpand all lines: src/compiler/diagnosticInformationMap.generated.ts
+5-5
Original file line number
Diff line number
Diff line change
@@ -114,7 +114,6 @@ module ts {
114
114
Cannot_compile_external_modules_unless_the_module_flag_is_provided: {code: 1148,category: DiagnosticCategory.Error,key: "Cannot compile external modules unless the '--module' flag is provided."},
115
115
Filename_0_differs_from_already_included_filename_1_only_in_casing: {code: 1149,category: DiagnosticCategory.Error,key: "Filename '{0}' differs from already included filename '{1}' only in casing"},
116
116
new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: {code: 1150,category: DiagnosticCategory.Error,key: "'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead."},
117
-
An_enum_member_cannot_have_a_numeric_name: {code: 1151,category: DiagnosticCategory.Error,key: "An enum member cannot have a numeric name."},
118
117
var_let_or_const_expected: {code: 1152,category: DiagnosticCategory.Error,key: "'var', 'let' or 'const' expected."},
119
118
let_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher: {code: 1153,category: DiagnosticCategory.Error,key: "'let' declarations are only available when targeting ECMAScript 6 and higher."},
120
119
const_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher: {code: 1154,category: DiagnosticCategory.Error,key: "'const' declarations are only available when targeting ECMAScript 6 and higher."},
@@ -267,10 +266,11 @@ module ts {
267
266
Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses: {code: 2445,category: DiagnosticCategory.Error,key: "Property '{0}' is protected and only accessible within class '{1}' and its subclasses."},
268
267
Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1: {code: 2446,category: DiagnosticCategory.Error,key: "Property '{0}' is protected and only accessible through an instance of class '{1}'."},
269
268
The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: {code: 2447,category: DiagnosticCategory.Error,key: "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."},
270
-
Block_scoped_variable_0_used_before_its_declaration: {code: 2448,category: DiagnosticCategory.Error,key: "Block-scoped variable '{0}' used before its declaration."},
271
-
The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant: {code: 2449,category: DiagnosticCategory.Error,key: "The operand of an increment or decrement operator cannot be a constant."},
272
-
Left_hand_side_of_assignment_expression_cannot_be_a_constant: {code: 2450,category: DiagnosticCategory.Error,key: "Left-hand side of assignment expression cannot be a constant."},
Block_scoped_variable_0_used_before_its_declaration: {code: 2448,category: DiagnosticCategory.Error,key: "Block-scoped variable '{0}' used before its declaration.",isEarly: true},
270
+
The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant: {code: 2449,category: DiagnosticCategory.Error,key: "The operand of an increment or decrement operator cannot be a constant.",isEarly: true},
271
+
Left_hand_side_of_assignment_expression_cannot_be_a_constant: {code: 2450,category: DiagnosticCategory.Error,key: "Left-hand side of assignment expression cannot be a constant.",isEarly: true},
An_enum_member_cannot_have_a_numeric_name: {code: 2452,category: DiagnosticCategory.Error,key: "An enum member cannot have a numeric name."},
274
274
Import_declaration_0_is_using_private_name_1: {code: 4000,category: DiagnosticCategory.Error,key: "Import declaration '{0}' is using private name '{1}'."},
275
275
Type_parameter_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: {code: 4001,category: DiagnosticCategory.Error,key: "Type parameter '{0}' of exported class has or is using name '{1}' from private module '{2}'."},
276
276
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: {code: 4002,category: DiagnosticCategory.Error,key: "Type parameter '{0}' of exported class has or is using private name '{1}'."},
0 commit comments