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
I would guess the solution is just to make sure all private methods are defined first in the constructor (right after super).
The class fields can then be defined after that.
The text was updated successfully, but these errors were encountered:
This class illustrates the issue
There is a private method #priv which is being referenced in the class field initializer for pub.
Transpiling with esbuild from ESNEXT to ES6 gives the following
The transpiled code gives an error.
The problem is the order of the two lines in the constructor.
The class field initializer
runs before the private method is defined
I would guess the solution is just to make sure all private methods are defined first in the constructor (right after super).
The class fields can then be defined after that.
The text was updated successfully, but these errors were encountered: