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