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
When inferring the type of a variable from its initializer we're performing a full type check of the initializer instead of just doing the minimal work to obtain its type (i.e. we're using checkExpression instead of getTypeOfExpression). This full type check causes a circularity to surface. We just need to be a little less eager.
src/a.ts(10,15): error TS7022: 'b' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
TypeScript Version: 2.2.1
Code
With
noImplicitAny
andstrictNullChecks
turned on, this gives error:The text was updated successfully, but these errors were encountered: