26 lines
1.7 KiB
Text
26 lines
1.7 KiB
Text
|
tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES5.ts(5,5): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||
|
tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES5.ts(6,5): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||
|
tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
|
||
|
tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES5.ts(7,5): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||
|
tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
|
||
|
|
||
|
|
||
|
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES5.ts (5 errors) ====
|
||
|
var p1: number | string;
|
||
|
var p2: number | number[];
|
||
|
var p3: string | boolean;
|
||
|
class C {
|
||
|
[p1]() { }
|
||
|
~~~~
|
||
|
!!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||
|
[p2]() { }
|
||
|
~~~~
|
||
|
!!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||
|
~~~~
|
||
|
!!! error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
|
||
|
[p3]() { }
|
||
|
~~~~
|
||
|
!!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||
|
~~~~
|
||
|
!!! error TS2464: A computed property name must be of type 'string', 'number', or 'any'.
|
||
|
}
|