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
The problem is, nobody expects this. But we can't and shouldn't change JS behaviour. But I think it is really necessary for people to get an error when they sort numbers.
This way, users can know the sort will work unexpectedly, they can convert to string before sorting, or they can convert to Float64Array.
Activity
kirkwaiblinger commentedon Sep 16, 2025
This is a linter concern: https://typescript-eslint.io/rules/require-array-sort-compare/
RyanCavanaugh commentedon Sep 16, 2025
#18286 tracks the most-likely fix for this
sahin52 commentedon Sep 16, 2025
Ryan Cavanaugh (@RyanCavanaugh) Thank you, I am closing the task