π 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
π Search Terms
TS7022 circularity
π Version & Regression Information
β― Playground Link
π» Code
π Actual behavior
TS7022:
valueimplicitly has typeanybecause 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