We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d479206 commit 60992caCopy full SHA for 60992ca
src/compiler/checker.ts
@@ -16873,7 +16873,7 @@ namespace ts {
16873
else if (target.flags & TypeFlags.IndexedAccess) {
16874
// A type S is related to a type T[K] if S is related to C, where C is the base
16875
// constraint of T[K] for writing.
16876
- if (relation !== identityRelation) {
+ if (relation === assignableRelation || relation === comparableRelation) {
16877
const objectType = (<IndexedAccessType>target).objectType;
16878
const indexType = (<IndexedAccessType>target).indexType;
16879
const baseObjectType = getBaseConstraintOfType(objectType) || objectType;
0 commit comments