Files
tsgo/testdata/baselines/reference/submodule/compiler/classIndexer3.errors.txt

22 lines
914 B
Plaintext

classIndexer3.ts(8,5): error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
classIndexer3.ts(9,5): error TS2411: Property 'y' of type 'string' is not assignable to 'string' index type 'number'.
classIndexer3.ts(9,5): error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
==== classIndexer3.ts (3 errors) ====
class C123 {
[s: string]: number;
constructor() {
}
}
class D123 extends C123 {
x: number;
~
!!! error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
y: string;
~
!!! error TS2411: Property 'y' of type 'string' is not assignable to 'string' index type 'number'.
~
!!! error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
}