-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issueNeeds InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.RescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone
Milestone
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.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issueNeeds InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.RescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone