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
else if (node.parent.kind === SyntaxKind.InterfaceDeclaration) {
11092
-
if (checkGrammarForDisallowedComputedProperty(node.name, Diagnostics.Computed_property_names_are_not_allowed_in_interfaces)) {
11092
+
if (checkGrammarForDisallowedComputedProperty(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_Symbol)) {
11093
11093
return true;
11094
11094
}
11095
11095
}
11096
11096
else if (node.parent.kind === SyntaxKind.TypeLiteral) {
11097
-
if (checkGrammarForDisallowedComputedProperty(node.name, Diagnostics.Computed_property_names_are_not_allowed_in_type_literals)) {
11097
+
if (checkGrammarForDisallowedComputedProperty(node.name, Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_Symbol)) {
Copy file name to clipboardexpand all lines: src/compiler/diagnosticInformationMap.generated.ts
+5-5
Original file line number
Diff line number
Diff line change
@@ -123,12 +123,12 @@ module ts {
123
123
An_object_member_cannot_be_declared_optional: {code: 1162,category: DiagnosticCategory.Error,key: "An object member cannot be declared optional."},
124
124
yield_expression_must_be_contained_within_a_generator_declaration: {code: 1163,category: DiagnosticCategory.Error,key: "'yield' expression must be contained_within a generator declaration."},
125
125
Computed_property_names_are_not_allowed_in_enums: {code: 1164,category: DiagnosticCategory.Error,key: "Computed property names are not allowed in enums."},
126
-
Computed_property_names_are_not_allowed_in_an_ambient_context: {code: 1165,category: DiagnosticCategory.Error,key: "Computed property names are not allowed in an ambient context."},
127
-
Computed_property_names_are_not_allowed_in_class_property_declarations: {code: 1166,category: DiagnosticCategory.Error,key: "Computed property names are not allowed in class property declarations."},
126
+
A_computed_property_name_in_an_ambient_context_must_directly_refer_to_a_built_in_Symbol: {code: 1165,category: DiagnosticCategory.Error,key: "A computed property name in an ambient context must directly refer to a built-in Symbol."},
127
+
A_computed_property_name_in_a_class_property_declaration_must_directly_refer_to_a_built_in_Symbol: {code: 1166,category: DiagnosticCategory.Error,key: "A computed property name in a class property declaration must directly refer to a built-in Symbol."},
128
128
Computed_property_names_are_only_available_when_targeting_ECMAScript_6_and_higher: {code: 1167,category: DiagnosticCategory.Error,key: "Computed property names are only available when targeting ECMAScript 6 and higher."},
129
-
Computed_property_names_are_not_allowed_in_method_overloads: {code: 1168,category: DiagnosticCategory.Error,key: "Computed property names are not allowed in method overloads."},
130
-
Computed_property_names_are_not_allowed_in_interfaces: {code: 1169,category: DiagnosticCategory.Error,key: "Computed property names are not allowed in interfaces."},
131
-
Computed_property_names_are_not_allowed_in_type_literals: {code: 1170,category: DiagnosticCategory.Error,key: "Computed property names are not allowed in type literals."},
129
+
A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_Symbol: {code: 1168,category: DiagnosticCategory.Error,key: "A computed property name in a method overload must directly refer to a built-in Symbol."},
130
+
A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_Symbol: {code: 1169,category: DiagnosticCategory.Error,key: "A computed property name in an interface must directly refer to a built-in Symbol."},
131
+
A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_Symbol: {code: 1170,category: DiagnosticCategory.Error,key: "A computed property name in a type literal must directly refer to a built-in Symbol."},
132
132
A_comma_expression_is_not_allowed_in_a_computed_property_name: {code: 1171,category: DiagnosticCategory.Error,key: "A comma expression is not allowed in a computed property name."},
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(5,5): error TS1166: Computed property names are not allowed in class property declarations.
2
-
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(6,5): error TS1166: Computed property names are not allowed in class property declarations.
3
-
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(7,12): error TS1166: Computed property names are not allowed in class property declarations.
4
-
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(8,5): error TS1166: Computed property names are not allowed in class property declarations.
5
-
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(9,5): error TS1166: Computed property names are not allowed in class property declarations.
6
-
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(10,12): error TS1166: Computed property names are not allowed in class property declarations.
7
-
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(11,5): error TS1166: Computed property names are not allowed in class property declarations.
8
-
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(12,5): error TS1166: Computed property names are not allowed in class property declarations.
9
-
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(13,12): error TS1166: Computed property names are not allowed in class property declarations.
10
-
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(14,5): error TS1166: Computed property names are not allowed in class property declarations.
11
-
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(15,12): error TS1166: Computed property names are not allowed in class property declarations.
1
+
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(5,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
2
+
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(6,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
3
+
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(7,12): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
4
+
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(8,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
5
+
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(9,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
6
+
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(10,12): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
7
+
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(11,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
8
+
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(12,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
9
+
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(13,12): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
10
+
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(14,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
11
+
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(15,12): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames35.ts(4,5): error TS1169: Computed property names are not allowed in interfaces.
1
+
tests/cases/conformance/es6/computedProperties/computedPropertyNames35.ts(4,5): error TS1169: A computed property name in an interface must directly refer to a built-in Symbol.
2
2
tests/cases/conformance/es6/computedProperties/computedPropertyNames35.ts(4,10): error TS2466: A computed property name cannot reference a type parameter from its containing type.
Copy file name to clipboardexpand all lines: tests/baselines/reference/computedPropertyNames42.errors.txt
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
tests/cases/conformance/es6/computedProperties/computedPropertyNames42.ts(8,5): error TS1166: Computed property names are not allowed in class property declarations.
1
+
tests/cases/conformance/es6/computedProperties/computedPropertyNames42.ts(8,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
2
2
tests/cases/conformance/es6/computedProperties/computedPropertyNames42.ts(8,5): error TS2411: Property '[""]' of type 'Foo' is not assignable to string index type 'Foo2'.
tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit3.ts(2,5): error TS1169: Computed property names are not allowed in interfaces.
1
+
tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit3.ts(2,5): error TS1169: A computed property name in an interface must directly refer to a built-in Symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit4.ts(2,5): error TS1170: Computed property names are not allowed in type literals.
1
+
tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit4.ts(2,5): error TS1170: A computed property name in a type literal must directly refer to a built-in Symbol.
0 commit comments