Skip to content

Commit 21fae9e

Browse files
committed
enhance comment
1 parent 4c6b623 commit 21fae9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13523,10 +13523,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
1352313523
return instantiateType(instantiable, createTypeMapper([type.indexType, type.objectType], [getNumberLiteralType(0), createTupleType([replacement])]));
1352413524
}
1352513525

13526-
// If the original mapped type had an intersection constraint, we extract its components,
13526+
// If the original mapped type had an intersection constraint we extract its components,
1352713527
// and we make an attempt to do so even if the intersection has been reduced to a union.
1352813528
// This entire process allows us to possibly retrieve the filtering type literals.
13529-
// e.g. { [K in keyof U & "a" | "b" ] } -> "a" | "b"
13529+
// e.g. { [K in keyof U & ("a" | "b") ] } -> "a" | "b"
1353013530
function getLimitedConstraint(type: ReverseMappedType) {
1353113531
const constraint = getConstraintTypeFromMappedType(type.mappedType);
1353213532
if (!(constraint.flags & TypeFlags.Union || constraint.flags & TypeFlags.Intersection)) {

0 commit comments

Comments
 (0)