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
In conditional types, we decide whether to "evaluate" the conditional type based on whether the most restrictive and least restrictive instantiations will succeed and not succeed.
But the way we track that is wrong because it compares with respect to the "wrong" container types.
PR reintroduces a "definitely assignable" relationship.
Simplifies our codebase quite a bit.
2.5% increase in compiling material-ui
That codebase is a stress-tester for regressions on type relationship checking.
We've had 9 releases where the current behavior has shipped until anyone realized.
Falsey<any>
->any
,Falsey<unknown>
->unknown
#39529
unknown
could be astring
or whatever.unknown
is not assignable toWhatever
param
was typed initially asstring
ornumber
.More Accurate Checks in Conditional Types
#39577
Quoted vs Unquoted Numerically Named Keys in Declaration Files
#37292
keyof C['lines']
be?1
or"1"
..d.ts
, we only printed out the string representation.Exclude
andOmit
?"0"
?"1"
?string
s and someone wrote an incorrectObject.keys
.Extract<keyof T, string>
or(keyof T) & string
.Supporting Types in the npm CLI
npm/read-package-json#92
exports
list work?The text was updated successfully, but these errors were encountered: