mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Update error codes
This commit is contained in:
@@ -124,14 +124,14 @@ module ts {
|
||||
Tagged_templates_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1159, category: DiagnosticCategory.Error, key: "Tagged templates are only available when targeting ECMAScript 6 and higher." },
|
||||
Unterminated_template_literal: { code: 1160, category: DiagnosticCategory.Error, key: "Unterminated template literal." },
|
||||
Unterminated_regular_expression_literal: { code: 1161, category: DiagnosticCategory.Error, key: "Unterminated regular expression literal." },
|
||||
An_object_member_cannot_be_declared_optional: { code: 1160, category: DiagnosticCategory.Error, key: "An object member cannot be declared optional." },
|
||||
Computed_property_names_are_not_allowed_in_interfaces_or_type_literals: { code: 1161, category: DiagnosticCategory.Error, key: "Computed property names are not allowed in interfaces or type literals." },
|
||||
Computed_property_names_are_not_allowed_in_enums: { code: 1162, category: DiagnosticCategory.Error, key: "Computed property names are not allowed in enums." },
|
||||
An_object_member_cannot_be_declared_optional: { code: 1162, category: DiagnosticCategory.Error, key: "An object member cannot be declared optional." },
|
||||
yield_expression_must_be_contained_within_a_generator_declaration: { code: 1163, category: DiagnosticCategory.Error, key: "'yield' expression must be contained_within a generator declaration." },
|
||||
Computed_property_names_are_not_allowed_in_an_ambient_context: { code: 1163, category: DiagnosticCategory.Error, key: "Computed property names are not allowed in an ambient context." },
|
||||
Computed_property_names_are_not_allowed_in_class_property_declarations: { code: 1164, category: DiagnosticCategory.Error, key: "Computed property names are not allowed in class property declarations." },
|
||||
Computed_property_names_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1165, category: DiagnosticCategory.Error, key: "Computed property names are only available when targeting ECMAScript 6 and higher." },
|
||||
Computed_property_names_are_not_allowed_in_method_overloads: { code: 1166, category: DiagnosticCategory.Error, key: "Computed property names are not allowed in method overloads." },
|
||||
Computed_property_names_are_not_allowed_in_enums: { code: 1164, category: DiagnosticCategory.Error, key: "Computed property names are not allowed in enums." },
|
||||
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." },
|
||||
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." },
|
||||
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." },
|
||||
Computed_property_names_are_not_allowed_in_method_overloads: { code: 1168, category: DiagnosticCategory.Error, key: "Computed property names are not allowed in method overloads." },
|
||||
Computed_property_names_are_not_allowed_in_interfaces_or_type_literals: { code: 1169, category: DiagnosticCategory.Error, key: "Computed property names are not allowed in interfaces or type literals." },
|
||||
Duplicate_identifier_0: { code: 2300, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'." },
|
||||
Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: DiagnosticCategory.Error, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." },
|
||||
Static_members_cannot_reference_class_type_parameters: { code: 2302, category: DiagnosticCategory.Error, key: "Static members cannot reference class type parameters." },
|
||||
|
||||
@@ -488,14 +488,6 @@
|
||||
"code": 1161
|
||||
},
|
||||
"An object member cannot be declared optional.": {
|
||||
"category": "Error",
|
||||
"code": 1160
|
||||
},
|
||||
"Computed property names are not allowed in interfaces or type literals.": {
|
||||
"category": "Error",
|
||||
"code": 1161
|
||||
},
|
||||
"Computed property names are not allowed in enums.": {
|
||||
"category": "Error",
|
||||
"code": 1162
|
||||
},
|
||||
@@ -503,22 +495,30 @@
|
||||
"category": "Error",
|
||||
"code": 1163
|
||||
},
|
||||
"Computed property names are not allowed in an ambient context.": {
|
||||
"category": "Error",
|
||||
"code": 1163
|
||||
},
|
||||
"Computed property names are not allowed in class property declarations.": {
|
||||
"Computed property names are not allowed in enums.": {
|
||||
"category": "Error",
|
||||
"code": 1164
|
||||
},
|
||||
"Computed property names are only available when targeting ECMAScript 6 and higher.": {
|
||||
"Computed property names are not allowed in an ambient context.": {
|
||||
"category": "Error",
|
||||
"code": 1165
|
||||
},
|
||||
"Computed property names are not allowed in method overloads.": {
|
||||
"Computed property names are not allowed in class property declarations.": {
|
||||
"category": "Error",
|
||||
"code": 1166
|
||||
},
|
||||
"Computed property names are only available when targeting ECMAScript 6 and higher.": {
|
||||
"category": "Error",
|
||||
"code": 1167
|
||||
},
|
||||
"Computed property names are not allowed in method overloads.": {
|
||||
"category": "Error",
|
||||
"code": 1168
|
||||
},
|
||||
"Computed property names are not allowed in interfaces or type literals.": {
|
||||
"category": "Error",
|
||||
"code": 1169
|
||||
},
|
||||
|
||||
"Duplicate identifier '{0}'.": {
|
||||
"category": "Error",
|
||||
|
||||
@@ -4477,7 +4477,12 @@ module ts {
|
||||
// However, property declarations disallow computed names in general,
|
||||
// and accessors are not allowed in ambient contexts in general,
|
||||
// so this error only really matters for methods.
|
||||
return inAmbientContext && checkForDisallowedComputedProperty(node.name, Diagnostics.Computed_property_names_are_not_allowed_in_an_ambient_context);
|
||||
if (inAmbientContext) {
|
||||
return checkForDisallowedComputedProperty(node.name, Diagnostics.Computed_property_names_are_not_allowed_in_an_ambient_context);
|
||||
}
|
||||
else if (!node.body) {
|
||||
return checkForDisallowedComputedProperty(node.name, Diagnostics.Computed_property_names_are_not_allowed_in_method_overloads);
|
||||
}
|
||||
}
|
||||
else if (node.parent.kind === SyntaxKind.InterfaceDeclaration || node.parent.kind === SyntaxKind.TypeLiteral) {
|
||||
return checkForDisallowedComputedProperty(node.name, Diagnostics.Computed_property_names_are_not_allowed_in_interfaces_or_type_literals);
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName10_es6.ts(2,8): error TS1005: ';' expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName10_es6.ts (1 errors) ====
|
||||
class C {
|
||||
[e] = 1
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName11_es6.ts(2,7): error TS1005: ';' expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName11_es6.ts(2,8): error TS1109: Expression expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName11_es6.ts(3,1): error TS1128: Declaration or statement expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName11_es6.ts (3 errors) ====
|
||||
class C {
|
||||
[e]();
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
}
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
@@ -1,15 +0,0 @@
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName12_es6.ts(2,7): error TS1005: ';' expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName12_es6.ts(2,10): error TS1005: '=>' expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName12_es6.ts(3,1): error TS1128: Declaration or statement expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName12_es6.ts (3 errors) ====
|
||||
class C {
|
||||
[e]() { }
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
~
|
||||
!!! error TS1005: '=>' expected.
|
||||
}
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
@@ -1,7 +0,0 @@
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName13_es6.ts(1,11): error TS1022: An index signature parameter must have a type annotation.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName13_es6.ts (1 errors) ====
|
||||
var v: { [e]: number };
|
||||
~
|
||||
!!! error TS1022: An index signature parameter must have a type annotation.
|
||||
@@ -1,7 +0,0 @@
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName14_es6.ts(1,13): error TS1005: ';' expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName14_es6.ts (1 errors) ====
|
||||
var v: { [e](): number };
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
@@ -1,7 +0,0 @@
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName15_es6.ts(1,32): error TS1022: An index signature parameter must have a type annotation.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName15_es6.ts (1 errors) ====
|
||||
var v: { [e: number]: string; [e]: number };
|
||||
~
|
||||
!!! error TS1022: An index signature parameter must have a type annotation.
|
||||
@@ -1,18 +0,0 @@
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName16_es6.ts(2,3): error TS1132: Enum member expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName16_es6.ts(3,1): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName16_es6.ts(2,3): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName16_es6.ts(2,4): error TS2304: Cannot find name 'e'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName16_es6.ts (4 errors) ====
|
||||
enum E {
|
||||
[e] = 1
|
||||
~
|
||||
!!! error TS1132: Enum member expected.
|
||||
~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'e'.
|
||||
}
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
@@ -1,16 +0,0 @@
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName17_es6.ts(1,15): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName17_es6.ts(1,22): error TS1005: ',' expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName17_es6.ts(1,26): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName17_es6.ts(1,16): error TS2304: Cannot find name 'e'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName17_es6.ts (4 errors) ====
|
||||
var v = { set [e](v) { } }
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'e'.
|
||||
@@ -1,7 +0,0 @@
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName18_es6.ts(1,13): error TS1005: ';' expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName18_es6.ts (1 errors) ====
|
||||
var v: { [e]?(): number };
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
@@ -1,7 +0,0 @@
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName19_es6.ts(1,13): error TS1005: ';' expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName19_es6.ts (1 errors) ====
|
||||
var v: { [e]? };
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
@@ -1,13 +0,0 @@
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName1_es6.ts(1,11): error TS1136: Property assignment expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName1_es6.ts(1,15): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName1_es6.ts(1,12): error TS2304: Cannot find name 'e'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName1_es6.ts (3 errors) ====
|
||||
var v = { [e] };
|
||||
~
|
||||
!!! error TS1136: Property assignment expected.
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'e'.
|
||||
@@ -1,19 +0,0 @@
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName2_es6.ts(1,11): error TS1136: Property assignment expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName2_es6.ts(1,14): error TS1005: ',' expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName2_es6.ts(1,16): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName2_es6.ts(1,18): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName2_es6.ts(1,12): error TS2304: Cannot find name 'e'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName2_es6.ts (5 errors) ====
|
||||
var v = { [e]: 1 };
|
||||
~
|
||||
!!! error TS1136: Property assignment expected.
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'e'.
|
||||
@@ -1,16 +0,0 @@
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName3_es6.ts(1,11): error TS1136: Property assignment expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName3_es6.ts(1,17): error TS1005: ',' expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName3_es6.ts(1,21): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName3_es6.ts(1,12): error TS2304: Cannot find name 'e'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName3_es6.ts (4 errors) ====
|
||||
var v = { [e]() { } };
|
||||
~
|
||||
!!! error TS1136: Property assignment expected.
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'e'.
|
||||
@@ -1,16 +0,0 @@
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName4_es6.ts(1,15): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName4_es6.ts(1,21): error TS1005: ',' expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName4_es6.ts(1,25): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName4_es6.ts(1,16): error TS2304: Cannot find name 'e'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName4_es6.ts (4 errors) ====
|
||||
var v = { get [e]() { } };
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'e'.
|
||||
@@ -1,19 +0,0 @@
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName5_es6.ts(1,18): error TS1005: ':' expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName5_es6.ts(1,28): error TS1005: ',' expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName5_es6.ts(1,32): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName5_es6.ts(1,18): error TS2304: Cannot find name 'get'.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName5_es6.ts(1,23): error TS2304: Cannot find name 'e'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName5_es6.ts (5 errors) ====
|
||||
var v = { public get [e]() { } };
|
||||
~~~
|
||||
!!! error TS1005: ':' expected.
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'get'.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'e'.
|
||||
@@ -1,28 +0,0 @@
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName6_es6.ts(1,11): error TS1136: Property assignment expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName6_es6.ts(1,14): error TS1005: ',' expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName6_es6.ts(1,16): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName6_es6.ts(1,26): error TS1005: ';' expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName6_es6.ts(1,30): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName6_es6.ts(1,12): error TS2304: Cannot find name 'e'.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName6_es6.ts(1,20): error TS2304: Cannot find name 'e'.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName6_es6.ts(1,24): error TS2304: Cannot find name 'e'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName6_es6.ts (8 errors) ====
|
||||
var v = { [e]: 1, [e + e]: 2 };
|
||||
~
|
||||
!!! error TS1136: Property assignment expected.
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'e'.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'e'.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'e'.
|
||||
@@ -1,9 +0,0 @@
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName7_es6.ts(2,5): error TS1022: An index signature parameter must have a type annotation.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName7_es6.ts (1 errors) ====
|
||||
class C {
|
||||
[e]
|
||||
~
|
||||
!!! error TS1022: An index signature parameter must have a type annotation.
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName8_es6.ts(2,12): error TS1022: An index signature parameter must have a type annotation.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName8_es6.ts (1 errors) ====
|
||||
class C {
|
||||
public [e]
|
||||
~
|
||||
!!! error TS1022: An index signature parameter must have a type annotation.
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName9_es6.ts(2,5): error TS1022: An index signature parameter must have a type annotation.
|
||||
tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName9_es6.ts(2,9): error TS2304: Cannot find name 'Type'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedPropertyNames/ComputedPropertyName9_es6.ts (2 errors) ====
|
||||
class C {
|
||||
[e]: Type
|
||||
~
|
||||
!!! error TS1022: An index signature parameter must have a type annotation.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'Type'.
|
||||
}
|
||||
@@ -4,7 +4,7 @@ tests/cases/compiler/giant.ts(28,17): error TS1056: Accessors are only available
|
||||
tests/cases/compiler/giant.ts(30,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/giant.ts(34,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/giant.ts(36,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/giant.ts(61,5): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/giant.ts(61,5): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/giant.ts(62,5): error TS1021: An index signature must have a type annotation.
|
||||
tests/cases/compiler/giant.ts(63,6): error TS1096: An index signature must have exactly one parameter.
|
||||
tests/cases/compiler/giant.ts(88,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
@@ -13,7 +13,7 @@ tests/cases/compiler/giant.ts(92,21): error TS1056: Accessors are only available
|
||||
tests/cases/compiler/giant.ts(94,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/giant.ts(98,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/giant.ts(100,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/giant.ts(125,9): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/giant.ts(125,9): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/giant.ts(126,9): error TS1021: An index signature must have a type annotation.
|
||||
tests/cases/compiler/giant.ts(127,10): error TS1096: An index signature must have exactly one parameter.
|
||||
tests/cases/compiler/giant.ts(154,39): error TS1037: A function implementation cannot be declared in an ambient context.
|
||||
@@ -23,7 +23,7 @@ tests/cases/compiler/giant.ts(171,21): error TS1056: Accessors are only availabl
|
||||
tests/cases/compiler/giant.ts(173,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/giant.ts(177,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/giant.ts(179,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/giant.ts(204,9): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/giant.ts(204,9): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/giant.ts(205,9): error TS1021: An index signature must have a type annotation.
|
||||
tests/cases/compiler/giant.ts(206,10): error TS1096: An index signature must have exactly one parameter.
|
||||
tests/cases/compiler/giant.ts(233,39): error TS1037: A function implementation cannot be declared in an ambient context.
|
||||
@@ -54,7 +54,7 @@ tests/cases/compiler/giant.ts(286,17): error TS1056: Accessors are only availabl
|
||||
tests/cases/compiler/giant.ts(288,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/giant.ts(292,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/giant.ts(294,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/giant.ts(319,5): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/giant.ts(319,5): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/giant.ts(320,5): error TS1021: An index signature must have a type annotation.
|
||||
tests/cases/compiler/giant.ts(321,6): error TS1096: An index signature must have exactly one parameter.
|
||||
tests/cases/compiler/giant.ts(346,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
@@ -63,7 +63,7 @@ tests/cases/compiler/giant.ts(350,21): error TS1056: Accessors are only availabl
|
||||
tests/cases/compiler/giant.ts(352,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/giant.ts(356,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/giant.ts(358,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/giant.ts(383,9): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/giant.ts(383,9): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/giant.ts(384,9): error TS1021: An index signature must have a type annotation.
|
||||
tests/cases/compiler/giant.ts(385,10): error TS1096: An index signature must have exactly one parameter.
|
||||
tests/cases/compiler/giant.ts(412,39): error TS1037: A function implementation cannot be declared in an ambient context.
|
||||
@@ -73,7 +73,7 @@ tests/cases/compiler/giant.ts(429,21): error TS1056: Accessors are only availabl
|
||||
tests/cases/compiler/giant.ts(431,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/giant.ts(435,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/giant.ts(437,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/giant.ts(462,9): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/giant.ts(462,9): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/giant.ts(463,9): error TS1021: An index signature must have a type annotation.
|
||||
tests/cases/compiler/giant.ts(464,10): error TS1096: An index signature must have exactly one parameter.
|
||||
tests/cases/compiler/giant.ts(491,39): error TS1037: A function implementation cannot be declared in an ambient context.
|
||||
@@ -120,7 +120,7 @@ tests/cases/compiler/giant.ts(556,21): error TS1036: Statements are not allowed
|
||||
tests/cases/compiler/giant.ts(558,24): error TS1111: A constructor implementation cannot be declared in an ambient context.
|
||||
tests/cases/compiler/giant.ts(561,21): error TS1037: A function implementation cannot be declared in an ambient context.
|
||||
tests/cases/compiler/giant.ts(563,21): error TS1037: A function implementation cannot be declared in an ambient context.
|
||||
tests/cases/compiler/giant.ts(587,9): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/giant.ts(587,9): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/giant.ts(588,9): error TS1021: An index signature must have a type annotation.
|
||||
tests/cases/compiler/giant.ts(589,10): error TS1096: An index signature must have exactly one parameter.
|
||||
tests/cases/compiler/giant.ts(606,22): error TS1037: A function implementation cannot be declared in an ambient context.
|
||||
@@ -137,7 +137,7 @@ tests/cases/compiler/giant.ts(621,29): error TS1036: Statements are not allowed
|
||||
tests/cases/compiler/giant.ts(623,24): error TS1111: A constructor implementation cannot be declared in an ambient context.
|
||||
tests/cases/compiler/giant.ts(626,21): error TS1037: A function implementation cannot be declared in an ambient context.
|
||||
tests/cases/compiler/giant.ts(628,21): error TS1037: A function implementation cannot be declared in an ambient context.
|
||||
tests/cases/compiler/giant.ts(653,9): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/giant.ts(653,9): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/giant.ts(654,9): error TS1021: An index signature must have a type annotation.
|
||||
tests/cases/compiler/giant.ts(655,10): error TS1096: An index signature must have exactly one parameter.
|
||||
tests/cases/compiler/giant.ts(672,22): error TS1037: A function implementation cannot be declared in an ambient context.
|
||||
@@ -361,7 +361,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all
|
||||
//Index Signature
|
||||
[p];
|
||||
~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
[p1: string];
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1021: An index signature must have a type annotation.
|
||||
@@ -469,7 +469,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all
|
||||
//Index Signature
|
||||
[p];
|
||||
~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
[p1: string];
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1021: An index signature must have a type annotation.
|
||||
@@ -594,7 +594,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all
|
||||
//Index Signature
|
||||
[p];
|
||||
~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
[p1: string];
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1021: An index signature must have a type annotation.
|
||||
@@ -821,7 +821,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all
|
||||
//Index Signature
|
||||
[p];
|
||||
~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
[p1: string];
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1021: An index signature must have a type annotation.
|
||||
@@ -929,7 +929,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all
|
||||
//Index Signature
|
||||
[p];
|
||||
~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
[p1: string];
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1021: An index signature must have a type annotation.
|
||||
@@ -1054,7 +1054,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all
|
||||
//Index Signature
|
||||
[p];
|
||||
~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
[p1: string];
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1021: An index signature must have a type annotation.
|
||||
@@ -1323,7 +1323,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all
|
||||
//Index Signature
|
||||
[p];
|
||||
~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
[p1: string];
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1021: An index signature must have a type annotation.
|
||||
@@ -1425,7 +1425,7 @@ tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all
|
||||
//Index Signature
|
||||
[p];
|
||||
~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
[p1: string];
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1021: An index signature must have a type annotation.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(2,5): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(2,5): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(3,5): error TS1021: An index signature must have a type annotation.
|
||||
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(7,5): error TS1164: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(7,5): error TS1166: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(12,5): error TS1021: An index signature must have a type annotation.
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(12,5): error TS1021
|
||||
interface I {
|
||||
[x]: string;
|
||||
~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
[x: string];
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS1021: An index signature must have a type annotation.
|
||||
@@ -17,7 +17,7 @@ tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(12,5): error TS1021
|
||||
class C {
|
||||
[x]: string
|
||||
~~~
|
||||
!!! error TS1164: Computed property names are not allowed in class property declarations.
|
||||
!!! error TS1166: Computed property names are not allowed in class property declarations.
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
tests/cases/compiler/indexSignatureWithInitializer.ts(2,5): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/indexSignatureWithInitializer.ts(6,5): error TS1164: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/compiler/indexSignatureWithInitializer.ts(2,5): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/indexSignatureWithInitializer.ts(6,5): error TS1166: Computed property names are not allowed in class property declarations.
|
||||
|
||||
|
||||
==== tests/cases/compiler/indexSignatureWithInitializer.ts (2 errors) ====
|
||||
interface I {
|
||||
[x = '']: string;
|
||||
~~~~~~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
}
|
||||
|
||||
class C {
|
||||
[x = 0]: string
|
||||
~~~~~~~
|
||||
!!! error TS1164: Computed property names are not allowed in class property declarations.
|
||||
!!! error TS1166: Computed property names are not allowed in class property declarations.
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/compiler/indexWithoutParamType2.ts(2,5): error TS1164: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/compiler/indexWithoutParamType2.ts(2,5): error TS1166: Computed property names are not allowed in class property declarations.
|
||||
|
||||
|
||||
==== tests/cases/compiler/indexWithoutParamType2.ts (1 errors) ====
|
||||
class C {
|
||||
[x]: string
|
||||
~~~
|
||||
!!! error TS1164: Computed property names are not allowed in class property declarations.
|
||||
!!! error TS1166: Computed property names are not allowed in class property declarations.
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/compiler/objectTypeWithOptionalProperty1.ts(2,10): error TS1160: An object member cannot be declared optional.
|
||||
tests/cases/compiler/objectTypeWithOptionalProperty1.ts(2,10): error TS1162: An object member cannot be declared optional.
|
||||
|
||||
|
||||
==== tests/cases/compiler/objectTypeWithOptionalProperty1.ts (1 errors) ====
|
||||
var b = {
|
||||
x?: 1 // error
|
||||
~
|
||||
!!! error TS1160: An object member cannot be declared optional.
|
||||
!!! error TS1162: An object member cannot be declared optional.
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts(12,6): error TS1112: A class member cannot be declared optional.
|
||||
tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts(20,6): error TS1112: A class member cannot be declared optional.
|
||||
tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts(24,6): error TS1160: An object member cannot be declared optional.
|
||||
tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts(24,6): error TS1162: An object member cannot be declared optional.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWithOptionalProperties.ts (3 errors) ====
|
||||
@@ -33,5 +33,5 @@ tests/cases/conformance/types/objectTypeLiteral/methodSignatures/objectTypesWith
|
||||
var b = {
|
||||
x?: 1 // error
|
||||
~
|
||||
!!! error TS1160: An object member cannot be declared optional.
|
||||
!!! error TS1162: An object member cannot be declared optional.
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts(2,4): error TS1164: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts(2,4): error TS1166: Computed property names are not allowed in class property declarations.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts (1 errors) ====
|
||||
class C {
|
||||
[e] = 1
|
||||
~~~
|
||||
!!! error TS1164: Computed property names are not allowed in class property declarations.
|
||||
!!! error TS1166: Computed property names are not allowed in class property declarations.
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts(2,4): error TS1166: Computed property names are not allowed in method overloads.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts(2,4): error TS1168: Computed property names are not allowed in method overloads.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts(2,4): error TS2391: Function implementation is missing or not immediately following the declaration.
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedP
|
||||
class C {
|
||||
[e]();
|
||||
~~~
|
||||
!!! error TS1166: Computed property names are not allowed in method overloads.
|
||||
!!! error TS1168: Computed property names are not allowed in method overloads.
|
||||
~~~
|
||||
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts(1,10): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts(1,10): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts (1 errors) ====
|
||||
var v: { [e]: number };
|
||||
~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts(1,10): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts(1,10): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts (1 errors) ====
|
||||
var v: { [e](): number };
|
||||
~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts(1,31): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts(1,31): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts (1 errors) ====
|
||||
var v: { [e: number]: string; [e]: number };
|
||||
~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName16.ts(2,3): error TS1162: Computed property names are not allowed in enums.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName16.ts(2,3): error TS1164: Computed property names are not allowed in enums.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName16.ts (1 errors) ====
|
||||
enum E {
|
||||
[e] = 1
|
||||
~~~
|
||||
!!! error TS1162: Computed property names are not allowed in enums.
|
||||
!!! error TS1164: Computed property names are not allowed in enums.
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts(1,10): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts(1,10): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts (1 errors) ====
|
||||
var v: { [e]?(): number };
|
||||
~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts(1,10): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts(1,10): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts (1 errors) ====
|
||||
var v: { [e]? };
|
||||
~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts(2,5): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts(2,5): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts (1 errors) ====
|
||||
interface I {
|
||||
[e](): number
|
||||
~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts(2,5): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts(2,5): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts (1 errors) ====
|
||||
interface I {
|
||||
[e]: number
|
||||
~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts(2,5): error TS1164: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts(2,5): error TS1166: Computed property names are not allowed in class property declarations.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts (1 errors) ====
|
||||
declare class C {
|
||||
[e]: number
|
||||
~~~
|
||||
!!! error TS1164: Computed property names are not allowed in class property declarations.
|
||||
!!! error TS1166: Computed property names are not allowed in class property declarations.
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts(3,5): error TS1164: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts(3,5): error TS1166: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'.
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedP
|
||||
// No ASI
|
||||
[e] = 0
|
||||
~~~
|
||||
!!! error TS1164: Computed property names are not allowed in class property declarations.
|
||||
!!! error TS1166: Computed property names are not allowed in class property declarations.
|
||||
[e2] = 1
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 'e2'.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName26.ts(3,5): error TS1162: Computed property names are not allowed in enums.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName26.ts(3,5): error TS1164: Computed property names are not allowed in enums.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName26.ts(4,6): error TS2304: Cannot find name 'e2'.
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedP
|
||||
// No ASI
|
||||
[e] = 0
|
||||
~~~
|
||||
!!! error TS1162: Computed property names are not allowed in enums.
|
||||
!!! error TS1164: Computed property names are not allowed in enums.
|
||||
[e2] = 1
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 'e2'.
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts(2,5): error TS1164: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts(3,5): error TS1164: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts(2,5): error TS1166: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts(3,5): error TS1166: Computed property names are not allowed in class property declarations.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts (2 errors) ====
|
||||
class C {
|
||||
[e]: number = 0;
|
||||
~~~
|
||||
!!! error TS1164: Computed property names are not allowed in class property declarations.
|
||||
!!! error TS1166: Computed property names are not allowed in class property declarations.
|
||||
[e2]: number
|
||||
~~~~
|
||||
!!! error TS1164: Computed property names are not allowed in class property declarations.
|
||||
!!! error TS1166: Computed property names are not allowed in class property declarations.
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts(3,5): error TS1164: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts(4,5): error TS1164: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts(3,5): error TS1166: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts(4,5): error TS1166: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts(3,11): error TS2304: Cannot find name 'id'.
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedP
|
||||
// yes ASI
|
||||
[e] = id++
|
||||
~~~
|
||||
!!! error TS1164: Computed property names are not allowed in class property declarations.
|
||||
!!! error TS1166: Computed property names are not allowed in class property declarations.
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 'id'.
|
||||
[e2]: number
|
||||
~~~~
|
||||
!!! error TS1164: Computed property names are not allowed in class property declarations.
|
||||
!!! error TS1166: Computed property names are not allowed in class property declarations.
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts(3,5): error TS1164: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts(4,5): error TS1164: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts(3,5): error TS1166: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts(4,5): error TS1166: Computed property names are not allowed in class property declarations.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts (2 errors) ====
|
||||
@@ -7,8 +7,8 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedP
|
||||
// yes ASI
|
||||
[e]: number
|
||||
~~~
|
||||
!!! error TS1164: Computed property names are not allowed in class property declarations.
|
||||
!!! error TS1166: Computed property names are not allowed in class property declarations.
|
||||
[e2]: number
|
||||
~~~~
|
||||
!!! error TS1164: Computed property names are not allowed in class property declarations.
|
||||
!!! error TS1166: Computed property names are not allowed in class property declarations.
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts(2,5): error TS1163: Computed property names are not allowed in an ambient context.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts(2,5): error TS1165: Computed property names are not allowed in an ambient context.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts (1 errors) ====
|
||||
declare class C {
|
||||
[e](): number
|
||||
~~~
|
||||
!!! error TS1163: Computed property names are not allowed in an ambient context.
|
||||
!!! error TS1165: Computed property names are not allowed in an ambient context.
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName34.ts(3,5): error TS1162: Computed property names are not allowed in enums.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName34.ts(4,5): error TS1162: Computed property names are not allowed in enums.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName34.ts(3,5): error TS1164: Computed property names are not allowed in enums.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName34.ts(4,5): error TS1164: Computed property names are not allowed in enums.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName34.ts(3,11): error TS2304: Cannot find name 'id'.
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedP
|
||||
// no ASI, comma expected
|
||||
[e] = id++,
|
||||
~~~
|
||||
!!! error TS1162: Computed property names are not allowed in enums.
|
||||
!!! error TS1164: Computed property names are not allowed in enums.
|
||||
~~
|
||||
!!! error TS2304: Cannot find name 'id'.
|
||||
[e2] = 1
|
||||
~~~~
|
||||
!!! error TS1162: Computed property names are not allowed in enums.
|
||||
!!! error TS1164: Computed property names are not allowed in enums.
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts(2,4): error TS1164: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts(2,4): error TS1166: Computed property names are not allowed in class property declarations.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts (1 errors) ====
|
||||
class C {
|
||||
[e]
|
||||
~~~
|
||||
!!! error TS1164: Computed property names are not allowed in class property declarations.
|
||||
!!! error TS1166: Computed property names are not allowed in class property declarations.
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts(2,11): error TS1164: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts(2,11): error TS1166: Computed property names are not allowed in class property declarations.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts (1 errors) ====
|
||||
class C {
|
||||
public [e]
|
||||
~~~
|
||||
!!! error TS1164: Computed property names are not allowed in class property declarations.
|
||||
!!! error TS1166: Computed property names are not allowed in class property declarations.
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts(2,4): error TS1164: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts(2,4): error TS1166: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'.
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedP
|
||||
class C {
|
||||
[e]: Type
|
||||
~~~
|
||||
!!! error TS1164: Computed property names are not allowed in class property declarations.
|
||||
!!! error TS1166: Computed property names are not allowed in class property declarations.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'Type'.
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts(2,5): error TS1164: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts(2,5): error TS1166: Computed property names are not allowed in class property declarations.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts (1 errors) ====
|
||||
declare class C {
|
||||
[e]: number
|
||||
~~~
|
||||
!!! error TS1164: Computed property names are not allowed in class property declarations.
|
||||
!!! error TS1166: Computed property names are not allowed in class property declarations.
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts(2,4): error TS1164: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts(2,4): error TS1166: Computed property names are not allowed in class property declarations.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts (1 errors) ====
|
||||
class C {
|
||||
[e] = 1
|
||||
~~~
|
||||
!!! error TS1164: Computed property names are not allowed in class property declarations.
|
||||
!!! error TS1166: Computed property names are not allowed in class property declarations.
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts(2,4): error TS1165: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts(2,4): error TS1168: Computed property names are not allowed in method overloads.
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts(2,4): error TS2391: Function implementation is missing or not immediately following the declaration.
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5Comput
|
||||
class C {
|
||||
[e]();
|
||||
~~~
|
||||
!!! error TS1165: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||||
!!! error TS1168: Computed property names are not allowed in method overloads.
|
||||
~~~
|
||||
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts(1,11): error TS1165: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts(1,11): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts (1 errors) ====
|
||||
var v = { [e]: 1 };
|
||||
~~~
|
||||
!!! error TS1165: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||||
!!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts(1,11): error TS1165: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts(1,11): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts (1 errors) ====
|
||||
var v = { [e]() { } };
|
||||
~~~
|
||||
!!! error TS1165: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||||
!!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts(1,15): error TS1165: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts(1,15): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts (1 errors) ====
|
||||
var v = { get [e]() { } };
|
||||
~~~
|
||||
!!! error TS1165: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||||
!!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts(2,5): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts(2,5): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts (1 errors) ====
|
||||
interface I {
|
||||
[e]: number
|
||||
~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName6.ts(2,3): error TS1162: Computed property names are not allowed in enums.
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName6.ts(2,3): error TS1164: Computed property names are not allowed in enums.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName6.ts (1 errors) ====
|
||||
enum E {
|
||||
[e] = 1
|
||||
~~~
|
||||
!!! error TS1162: Computed property names are not allowed in enums.
|
||||
!!! error TS1164: Computed property names are not allowed in enums.
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts(2,4): error TS1164: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts(2,4): error TS1166: Computed property names are not allowed in class property declarations.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts (1 errors) ====
|
||||
class C {
|
||||
[e]
|
||||
~~~
|
||||
!!! error TS1164: Computed property names are not allowed in class property declarations.
|
||||
!!! error TS1166: Computed property names are not allowed in class property declarations.
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts(1,10): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts(1,10): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts (1 errors) ====
|
||||
var v: { [e]: number };
|
||||
~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts(2,4): error TS1164: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts(2,4): error TS1166: Computed property names are not allowed in class property declarations.
|
||||
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'.
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5Comput
|
||||
class C {
|
||||
[e]: Type
|
||||
~~~
|
||||
!!! error TS1164: Computed property names are not allowed in class property declarations.
|
||||
!!! error TS1166: Computed property names are not allowed in class property declarations.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'Type'.
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts(2,9): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts(2,9): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts(3,9): error TS1021: An index signature must have a type annotation.
|
||||
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts(4,10): error TS1096: An index signature must have exactly one parameter.
|
||||
|
||||
@@ -7,7 +7,7 @@ tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature1
|
||||
interface I {
|
||||
[p];
|
||||
~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
[p1: string];
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1021: An index signature must have a type annotation.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature4.ts(2,3): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature4.ts(2,3): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature4.ts (1 errors) ====
|
||||
interface I {
|
||||
[a = 0]
|
||||
~~~~~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts(2,3): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts(2,3): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts (1 errors) ====
|
||||
interface I {
|
||||
[a]
|
||||
~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/propertyAssignment.ts(6,13): error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/propertyAssignment.ts(6,13): error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
tests/cases/compiler/propertyAssignment.ts(14,1): error TS2322: Type '{ x: number; }' is not assignable to type 'new () => any'.
|
||||
tests/cases/compiler/propertyAssignment.ts(16,1): error TS2322: Type '{ x: number; }' is not assignable to type '() => void'.
|
||||
|
||||
@@ -11,7 +11,7 @@ tests/cases/compiler/propertyAssignment.ts(16,1): error TS2322: Type '{ x: numbe
|
||||
|
||||
var foo2: { [index]; } // should be an error
|
||||
~~~~~~~
|
||||
!!! error TS1161: Computed property names are not allowed in interfaces or type literals.
|
||||
!!! error TS1169: Computed property names are not allowed in interfaces or type literals.
|
||||
var bar2: { x : number; }
|
||||
|
||||
var foo3: { ():void; }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/compiler/spaceBeforeQuestionMarkInPropertyAssignment.ts(1,12): error TS1160: An object member cannot be declared optional.
|
||||
tests/cases/compiler/spaceBeforeQuestionMarkInPropertyAssignment.ts(1,12): error TS1162: An object member cannot be declared optional.
|
||||
|
||||
|
||||
==== tests/cases/compiler/spaceBeforeQuestionMarkInPropertyAssignment.ts (1 errors) ====
|
||||
var x = {x ?: 1} // should not crash
|
||||
~
|
||||
!!! error TS1160: An object member cannot be declared optional.
|
||||
!!! error TS1162: An object member cannot be declared optional.
|
||||
@@ -1,3 +0,0 @@
|
||||
class C {
|
||||
[e] = 1
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
class C {
|
||||
[e]();
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
class C {
|
||||
[e]() { }
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
var v: { [e]: number };
|
||||
@@ -1 +0,0 @@
|
||||
var v: { [e](): number };
|
||||
@@ -1 +0,0 @@
|
||||
var v: { [e: number]: string; [e]: number };
|
||||
@@ -1,3 +0,0 @@
|
||||
enum E {
|
||||
[e] = 1
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
var v = { set [e](v) { } }
|
||||
@@ -1 +0,0 @@
|
||||
var v: { [e]?(): number };
|
||||
@@ -1 +0,0 @@
|
||||
var v: { [e]? };
|
||||
@@ -1 +0,0 @@
|
||||
var v = { [e] };
|
||||
@@ -1 +0,0 @@
|
||||
var v = { [e]: 1 };
|
||||
@@ -1 +0,0 @@
|
||||
var v = { [e]() { } };
|
||||
@@ -1 +0,0 @@
|
||||
var v = { get [e]() { } };
|
||||
@@ -1 +0,0 @@
|
||||
var v = { public get [e]() { } };
|
||||
@@ -1 +0,0 @@
|
||||
var v = { [e]: 1, [e + e]: 2 };
|
||||
@@ -1,3 +0,0 @@
|
||||
class C {
|
||||
[e]
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
class C {
|
||||
public [e]
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
class C {
|
||||
[e]: Type
|
||||
}
|
||||
Reference in New Issue
Block a user