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 {
46124612 // the modifiers type is T. Otherwise, the modifiers type is {}.
46134613 const declaredType = <MappedType>getTypeFromMappedTypeNode(type.declaration);
46144614 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;
46174617 }
46184618 }
46194619 return type.modifiersType;
You can’t perform that action at this time.
0 commit comments