Skip to content

Commit b6a836a

Browse files
committed
Remove fix for keyof types, fixed by #27157
1 parent a55d6fb commit b6a836a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15277,8 +15277,7 @@ namespace ts {
1527715277
impliedType = getAssignmentReducedType(impliedType as UnionType, getBaseConstraintOfType(type) || type);
1527815278
}
1527915279
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]);
15280+
return impliedType;
1528215281
}
1528315282
if (type.flags & TypeFlags.Instantiable) {
1528415283
const constraint = getBaseConstraintOfType(type) || anyType;

0 commit comments

Comments
 (0)