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

18 lines
872 B
Text
Raw Normal View History

tests/cases/conformance/es6/computedProperties/computedPropertyNames42.ts(8,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames42.ts(8,5): error TS2411: Property '[""]' of type 'Foo' is not assignable to string index type 'Foo2'.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames42.ts (2 errors) ====
class Foo { x }
class Foo2 { x; y }
class C {
[s: string]: Foo2;
// Computed properties
[""]: Foo;
~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
~~~~~~~~~~
!!! error TS2411: Property '[""]' of type 'Foo' is not assignable to string index type 'Foo2'.
}