Skip to content

Commit d17e662

Browse files
committed
Fix outdated comments for unknown type
1 parent b7fe99a commit d17e662

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
@@ -7474,7 +7474,7 @@ namespace ts {
74747474
else {
74757475
// Otherwise, get the declared constraint type, and if the constraint type is a type parameter,
74767476
// get the constraint of that type parameter. If the resulting type is an indexed type 'keyof T',
7477-
// the modifiers type is T. Otherwise, the modifiers type is {}.
7477+
// the modifiers type is T. Otherwise, the modifiers type is unknown.
74787478
const declaredType = <MappedType>getTypeFromMappedTypeNode(type.declaration);
74797479
const constraint = getConstraintTypeFromMappedType(declaredType);
74807480
const extendedConstraint = constraint && constraint.flags & TypeFlags.TypeParameter ? getConstraintOfTypeParameter(<TypeParameter>constraint) : constraint;
@@ -22570,7 +22570,7 @@ namespace ts {
2257022570
links.type = contextualType;
2257122571
const decl = parameter.valueDeclaration as ParameterDeclaration;
2257222572
if (decl.name.kind !== SyntaxKind.Identifier) {
22573-
// if inference didn't come up with anything but {}, fall back to the binding pattern if present.
22573+
// if inference didn't come up with anything but unknown, fall back to the binding pattern if present.
2257422574
if (links.type === unknownType) {
2257522575
links.type = getTypeFromBindingPattern(decl.name);
2257622576
}

0 commit comments

Comments
 (0)