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
classNested{}classA{b: Nested=newNested();// `this` causes some kind of assignable error?c: Nested[]=[this.b];}exportfunctionadd(): i32{leta=newA();return42;}
It produces the following error...
;; ERROR TS2322: Type '~lib/object/Object' is not assignable to type 'module/A'.
;; :
;; 7 │ c: Nested[] = [this.b];
;; │ ~~~~
;; └─ in module.ts(7,18)
I found this error while working on my HTTP parser and needed to do a big refactor. I hit nearly 280 errors because I had to port my lexer combinator rules over to class properties.
Is there a workaround? And where might the problem be located in the compiler? I would love to help.
The text was updated successfully, but these errors were encountered:
It produces the following error...
I found this error while working on my HTTP parser and needed to do a big refactor. I hit nearly 280 errors because I had to port my lexer combinator rules over to class properties.
Is there a workaround? And where might the problem be located in the compiler? I would love to help.
The text was updated successfully, but these errors were encountered: