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
{{ message }}
Repository navigation
Class members that are non-optional or are not unioned with undefined don't require initialisation. #20829
Expected behavior:
I'd expect the code above to blow up, because I've not assigned a value to the test member. The compiler could require me to do either of the following to address the issue (similarly to how e.g. Java behaves):
Activity
j-oliveras commentedon Dec 20, 2017
That will be one of the features of the next version. The pull request #20075 implement this. Roadmap with 2.7 features.
You can try this feature with
npm install -g typescript@next(more info about trying future versions).