Error on circular constraints in mapped types

This commit is contained in:
Anders Hejlsberg
2016-11-18 06:13:04 -08:00
committed by Mohamed Hegazy
parent 398244177d
commit 47cf1ff5fc

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;
}