18 lines
830 B
Text
18 lines
830 B
Text
|
tests/cases/conformance/es6/computedProperties/computedPropertyNames42_ES5.ts(8,5): error TS1166: Computed property names are not allowed in class property declarations.
|
||
|
tests/cases/conformance/es6/computedProperties/computedPropertyNames42_ES5.ts(8,5): error TS2411: Property '[""]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||
|
|
||
|
|
||
|
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames42_ES5.ts (2 errors) ====
|
||
|
class Foo { x }
|
||
|
class Foo2 { x; y }
|
||
|
|
||
|
class C {
|
||
|
[s: string]: Foo2;
|
||
|
|
||
|
// Computed properties
|
||
|
[""]: Foo;
|
||
|
~~~~
|
||
|
!!! error TS1166: Computed property names are not allowed in class property declarations.
|
||
|
~~~~~~~~~~
|
||
|
!!! error TS2411: Property '[""]' of type 'Foo' is not assignable to string index type 'Foo2'.
|
||
|
}
|