TypeScript/tests/baselines/reference/computedPropertyNames23_ES5.errors.txt

22 lines
1.1 KiB
Text
Raw Normal View History

tests/cases/conformance/es6/computedProperties/computedPropertyNames23_ES5.ts(5,5): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/es6/computedProperties/computedPropertyNames23_ES5.ts(6,11): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/es6/computedProperties/computedPropertyNames23_ES5.ts(6,12): error TS2465: 'this' cannot be referenced in a computed property name.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames23_ES5.ts (3 errors) ====
class C {
bar() {
return 0;
}
[
~
{ [this.bar()]: 1 }[0]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~
!!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
~~~~
!!! error TS2465: 'this' cannot be referenced in a computed property name.
]() { }
~~~~~
!!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
}