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
1. `T[K]` now correctly produces `number` when
`K extends string, T extends Record<K, number>`.
2. `T[K]` no longer allows any type to be assigned to it when
`T extends object, K extends keyof T`.
Previously both of these cases failed in
getConstraintOfIndexedAccessType because both bases followed `K`'s base
constraint to `string` and then incorrectly produced `any` for types
(like `object`) with no string index signature. In (1), this produced an
error in checkBinaryLikeExpression`. In (2), this failed to produce an
error in `checkTypeRelatedTo`.
0 commit comments