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
Doing erasure in the infer positions is hard because we don't know whether they're actually co- or contra-variant, so we don't know if we're doing the right thing.
It is unsound to erase to unknown.
This is technically a bug.
Instead of erasing, we should run a different sort of inference?
It's during instantiation that
Slightly uneasy about the higher order cases where you might get instantiated with never.
More errors on
never
#24291
never
that never is equivalent toany
.never
, it's that we don't signal reachability analysis based on control-flow analysis.assertNever
?never
?type T = { x: string, y: number };
T['x' | 'y']
isnumber | string
T['x']
isstring
T[never]
isnever
Assignability for both conditional type branches
#26933
infer
positions is hard because we don't know whether they're actually co- or contra-variant, so we don't know if we're doing the right thing.unknown
.never
.infer
positionsEnum literal freshness
#26556
let y = x
, we would widen toE
, which is expected.let y: E.A = E.A
.Generalized index signatures
extend Record<SomeUnionOfStrings, SomeOutputType>
, but it's not easy to get there.The text was updated successfully, but these errors were encountered: