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
Both (1) and (2) should complain about length not existing on number
Actual behavior:
(1) correctly complains: foo.ts(3,30): error TS2339: Property 'length' does not exist on type 'number'. But there is no error for (2).
Adding --noImplicitAny doesn't change the result.
Adding --noImplicitThis gives foo.ts(4,36): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. which confirms that this in (2) is getting inferred as any