mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
19 lines
870 B
Plaintext
19 lines
870 B
Plaintext
classIndexer2.ts(3,5): error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
|
|
classIndexer2.ts(4,5): error TS2411: Property 'y' of type 'string' is not assignable to 'string' index type 'number'.
|
|
classIndexer2.ts(4,5): error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
|
|
|
|
|
|
==== classIndexer2.ts (3 errors) ====
|
|
class C123 {
|
|
[s: string]: number;
|
|
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.
|
|
constructor() {
|
|
}
|
|
} |