mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
43 lines
1.5 KiB
Plaintext
43 lines
1.5 KiB
Plaintext
defineProperty.ts(3,14): error TS2729: Property 'y' is used before its initialization.
|
|
defineProperty.ts(10,14): error TS2729: Property 'y' is used before its initialization.
|
|
defineProperty.ts(18,14): error TS2729: Property 'ka' is used before its initialization.
|
|
defineProperty.ts(22,15): error TS2729: Property 'ka' is used before its initialization.
|
|
|
|
|
|
==== defineProperty.ts (4 errors) ====
|
|
var x: "p" = "p"
|
|
class A {
|
|
a = this.y
|
|
~
|
|
!!! error TS2729: Property 'y' is used before its initialization.
|
|
!!! related TS2728 defineProperty.ts:9:17: 'y' is declared here.
|
|
b
|
|
public c;
|
|
["computed"] = 13
|
|
;[x] = 14
|
|
m() { }
|
|
constructor(public readonly y: number) { }
|
|
z = this.y
|
|
~
|
|
!!! error TS2729: Property 'y' is used before its initialization.
|
|
!!! related TS2728 defineProperty.ts:9:17: 'y' is declared here.
|
|
declare notEmitted;
|
|
}
|
|
class B {
|
|
public a;
|
|
}
|
|
class C extends B {
|
|
declare public a;
|
|
z = this.ka
|
|
~~
|
|
!!! error TS2729: Property 'ka' is used before its initialization.
|
|
!!! related TS2728 defineProperty.ts:19:17: 'ka' is declared here.
|
|
constructor(public ka: number) {
|
|
super()
|
|
}
|
|
ki = this.ka
|
|
~~
|
|
!!! error TS2729: Property 'ka' is used before its initialization.
|
|
!!! related TS2728 defineProperty.ts:19:17: 'ka' is declared here.
|
|
}
|
|
|