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
declareclassC{// TypeScript correctly reports an error here.foo: typeofthis.foo;// TypeScript does not report an error here.getbar(): typeofthis.bar;}
Expected
An error on both foo and bar.
'foo' is referenced directly or indirectly in its own type annotation.
'bar' is referenced directly or indirectly in its own type annotation.
Actual
Just an error on bar.
'bar' is referenced directly or indirectly in its own type annotation.
The text was updated successfully, but these errors were encountered:
DanielRosenwasser
changed the title
No circularity error for get accessors
No circularity error for self referential get accessor annotations
Feb 25, 2022
The actual error(s) I'm seeing are rather weirder than this issue would suggest.
'foo' is referenced directly or indirectly in its own type annotation.
'bar' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
Public property 'foo' of exported class has or is using private name 'this'.
Return type of public getter 'bar' from exported class has or is using private name 'this'.
Expected
An error on both
foo
andbar
.Actual
Just an error on
bar
.The text was updated successfully, but these errors were encountered: