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
The current handbook describes very well the order of initialization for base class vs derived class. But I failed to find any documentation on when are contructor property parameters initialized. I believe they are initialized before class field initializers. This was critical info that I lacked and had to dig deeper to find it.
I believe they are initialized before class field initializers
It actually looks like this might have changed, as of target: es2022. When I set that option, regular properties are initialised before property parameters; related I think to microsoft/TypeScript#45995
The current handbook describes very well the order of initialization for base class vs derived class. But I failed to find any documentation on when are contructor property parameters initialized. I believe they are initialized before class field initializers. This was critical info that I lacked and had to dig deeper to find it.
Please add this information to the paragraph that describes constructor property parameters. https://www.typescriptlang.org/docs/handbook/2/classes.html#parameter-properties
The text was updated successfully, but these errors were encountered: