You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classB{}classA{b: B;c: B;constructor(){// this should be safe?this.b=newB();this.c=this.b;}}exportfunctionfib(n: i32): i32{leta=newA();return0;}
Error:
;; ERROR TS2564: Property 'module/A#c' has no initializer and is not assigned in the constructor before 'this' is used or returned.
;; :
;; 4 │ c: B;
;; │ ~
;; └─ in module.ts(4,3)
;; :
;; 7 │ this.c = this.b;
;; │ ~~~~~~
;; └─ in module.ts(7,14)