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
Number.isInteger was never type guarding. In your 4.9 playground you can see in line 18 that value is still typed State, not number. But TypeScript 5.0 now forbids implicit coercions in relational operators, resulting in the error you see.
Bug Report
π Search Terms
isInteger
type guard
π Version & Regression Information
5.0.2
NOTE: there is no 5.0.2 version on the playground so I selected nightly
β― Playground Link
5.1.0 Playground
4.9.5 Playground
π» Code
π Actual behavior
Number.isInteger guards are no longer inferring that a value is a number
π Expected behavior
Number.isInteger should type guard
The text was updated successfully, but these errors were encountered: