-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
Fix 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.
Description
π Search Terms
TS7022 circularity
π Version & Regression Information
- This changed between versions 5.3.3 and 5.4.2
β― Playground Link
π» Code
declare function is<T>(v: T): v is T;
const o: Record<string, string> | undefined = {};
if (o) {
for (const key in o) {
const value = o[key];
if (is<string>(value)) {
}
}
}π Actual behavior
TS7022: value implicitly has type any because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
π Expected behavior
No error, like in 5.3.3.
Additional information about the issue
No response
Metadata
Metadata
Assignees
Labels
Fix 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.