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

30 lines
2.1 KiB
Plaintext
Raw Normal View History

tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts (6 errors) ====
var b: boolean;
class C {
get [b]() { return 0;}
~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
static set [true](v) { }
~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
get [[]]() { return 0; }
~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
set [{}](v) { }
~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
static get [undefined]() { return 0; }
~~~~~~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
set [null](v) { }
~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
}