We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b7012b5 commit cd7a14aCopy full SHA for cd7a14a
src/compiler/checker.ts
@@ -13066,8 +13066,7 @@ namespace ts {
13066
}
13067
// A type S is assignable to keyof T if S is assignable to keyof C, where C is the
13068
// simplified form of T or, if T doesn't simplify, the constraint of T.
13069
- const simplified = getSimplifiedType((<IndexType>target).type, /*writing*/ false);
13070
- const constraint = simplified !== (<IndexType>target).type ? simplified : getConstraintOfType((<IndexType>target).type);
+ const constraint = getSimplifiedTypeOrConstraint((<IndexType>target).type);
13071
if (constraint) {
13072
// We require Ternary.True here such that circular constraints don't cause
13073
// false positives. For example, given 'T extends { [K in keyof T]: string }',
0 commit comments