Closed
Description
Bug Report
π Search Terms
π Version & Regression Information
- This changed between versions 4.6.4 and 4.7.3
β― Playground Link
cannot reproduce in playground
π» Code
function fn(Foo: number) {
type Foo = typeof Foo;
return 0 as any as {x: Foo};
}
π Actual behavior
In vscode with TS version > 4.6.4 it reports 'Foo' is referenced directly or indirectly in its own type annotation.ts(2502)
. But it works well in the playground.
This is first reported by @TechQuery in #50792 (comment), and I realize it may be related to #50161 and #50191 since the behavior is quite similar.
π Expected behavior
No error.