File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -4612,8 +4612,8 @@ namespace ts {
4612
4612
// the modifiers type is T. Otherwise, the modifiers type is {}.
4613
4613
const declaredType = <MappedType>getTypeFromMappedTypeNode(type.declaration);
4614
4614
const constraint = getConstraintTypeFromMappedType(declaredType);
4615
- const extendedConstraint = constraint.flags & TypeFlags.TypeParameter ? getConstraintOfTypeParameter(<TypeParameter>constraint) : constraint;
4616
- type.modifiersType = extendedConstraint.flags & TypeFlags.Index ? instantiateType((<IndexType>extendedConstraint).type, type.mapper || identityMapper) : emptyObjectType;
4615
+ const extendedConstraint = constraint && constraint .flags & TypeFlags.TypeParameter ? getConstraintOfTypeParameter(<TypeParameter>constraint) : constraint;
4616
+ type.modifiersType = extendedConstraint && extendedConstraint .flags & TypeFlags.Index ? instantiateType((<IndexType>extendedConstraint).type, type.mapper || identityMapper) : emptyObjectType;
4617
4617
}
4618
4618
}
4619
4619
return type.modifiersType;
You can’t perform that action at this time.
0 commit comments