Skip to content

Commit 59b6549

Browse files
committed
fix format
1 parent 5f3cf18 commit 59b6549

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/checker.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -13668,7 +13668,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
1366813668
return instantiateType(instantiable, createTypeMapper([type.indexType, type.objectType], [getNumberLiteralType(0), createTupleType([replacement])]));
1366913669
}
1367013670

13671-
// If the original mapped type had an union/intersection constraint
13671+
// If the original mapped type had an union/intersection constraint
1367213672
// there is a chance that it includes an intersection that could limit what members are allowed
1367313673
function getReverseMappedTypeMembersLimitingConstraint(type: ReverseMappedType) {
1367413674
const constraint = getConstraintTypeFromMappedType(type.mappedType);
@@ -13696,7 +13696,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
1369613696
// which, in turn, could fail the check if the inferred type is assignable to its constraint
1369713697
//
1369813698
// inferring `{ a: number; b: string }` wouldn't satisfy T's constraint so b has to be skipped over here
13699-
//
13699+
//
1370013700
// function fn<T extends Record<string, number>>({ [K in keyof T & "a"]: T[K] }): T
1370113701
// const obj = { a: 1, b: '2' };
1370213702
// fn(obj);

0 commit comments

Comments
 (0)