initialized property that references this
triggers "referenced directly or indirectly in its own initializer." when referenced outside the constructor
#16892
Labels
Design Limitation
Constraints of the existing architecture prevent this from being fixed
This seems like a bug; but let me know if this would be better suited for SO
TypeScript Version: 2.4.1 (and prior)
Code
Expected behavior:
Compiles without complaint
Actual behavior:
When
render()
referencesthis.styles.root
, bothstyles
andrender
are flagged with:If I remove the reference to
this.styles.root
, neither property has an error. Also, the type ofstyles
appears correctly inferred as{ root: string }
The text was updated successfully, but these errors were encountered: