Instance properties declaration and initialization in constructor failed with useDefineForClassFields turned on #34942
Labels
Bug
A bug in TypeScript
Fix Available
A PR has been opened for this issue
Fixed
A PR has been merged for this issue
High Priority
Milestone
TypeScript Version: 3.7.2
Search Terms: useDefineForClassFields, constructor
Code
Expected behavior: I expect
k.something
to be5
Actual behavior:
k.something
is undefined, cause TS:writable: true
, I think it is bug too) tovoid 0
Playground Link: https://www.typescriptlang.org/play/?useDefineForClassFields=true&target=7&ssl=3&ssc=2&pln=1&pc=1#code/MYGwhgzhAEAqCmEAu0DeAoaXrAPYDtkAnAV2CVyIAoAHEgIxAEthoj4wATAkAT2gi4AtvCQALJvgDmALmj4SQ+vCIBKNNAC+6TUA
The text was updated successfully, but these errors were encountered: