Error on circular constraints in mapped types

This commit is contained in:
Anders Hejlsberg 2016-11-18 06:13:04 -08:00
parent 2646828198
commit 63387bb5e0

View File

@ -6059,6 +6059,9 @@ namespace ts {
type.aliasSymbol = getAliasSymbolForTypeNode(node);
type.aliasTypeArguments = getAliasTypeArgumentsForTypeNode(node);
links.resolvedType = type;
// Eagerly resolve the constraint type which forces an error if the constraint type circularly
// references itself through one or more type aliases.
getConstraintTypeFromMappedType(type);
}
return links.resolvedType;
}