mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
22 lines
914 B
Plaintext
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.
|
|
} |