Error on circular constraints in mapped types

This commit is contained in:
Anders Hejlsberg authored and Mohamed Hegazy committed 2016-11-18 15:24:32 -08:00
1 parent 398244177d
commit 47cf1ff5fc
1 file changed
+3
+3
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;
}