TypeScript/tests/baselines/reference/computedPropertyNames14_ES5.errors.txt
2015-02-04 15:33:53 -08:00

30 lines
No EOL
1.9 KiB
Text

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