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
A broad number now gives a plain boolean. Before, one of the branches was typed never: the else branch for isFinite(), and the if branch for isInteger() and isSafeInteger().
.filter(isFinite) no longer narrows. To filter a union of numeric literals, use .filter(value => isFinite(value)).
objectFromEntries(): If any as const entry has a union or widened key (for example, [condition ? 'a' : 'b', 1]), every key of the result is now optional 0a127b7
Before, all keys were typed as required, even though only one member of the union key was written.
Improve the error messages of assertError() and assertNever() for values that are hard to print 64c3ed0
Fixes
Fix isEmpty() narrowing a non-tuple array to never35b9c24
Fix arrayIncludes() and setHas() narrowing the else branch to never when the item already has the element type 6b697de
Fix objectKeys(), objectValues(), and objectEntries() including Array.prototype members for tuples, typed arrays, and Buffer0a127b7
Fix not() narrowing a branch to never for an unknown value 35b9c24
Fix objectHasOwn() throwing for null and undefined0a127b7
Fix objectHasIn() and keyIn() throwing for primitives 0a127b735b9c24
Fix objectHasIn(), objectHasOwn(), and keyIn() narrowing a branch to never for index signatures and widened keys. They now return a plain boolean there 0a127b735b9c24
Fix isPropertyDefined() and isPropertyPresent() dropping readonly modifiers and union members that do not declare the key 35b9c24
Fix arrayAt() types for negative indices other than -1 and for fractional indices on tuples 6b697de
Fix the type guards throwing for revoked proxies 0a127b735b9c24