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 a55d6fb commit b6a836aCopy full SHA for b6a836a
src/compiler/checker.ts
@@ -15277,8 +15277,7 @@ namespace ts {
15277
impliedType = getAssignmentReducedType(impliedType as UnionType, getBaseConstraintOfType(type) || type);
15278
}
15279
if (isTypeSubtypeOf(impliedType, type)) {
15280
- // Intersection to handle `string` being a subtype of `keyof T`
15281
- return type.flags & TypeFlags.Any ? impliedType : getIntersectionType([type, impliedType]);
+ return impliedType;
15282
15283
if (type.flags & TypeFlags.Instantiable) {
15284
const constraint = getBaseConstraintOfType(type) || anyType;
0 commit comments