mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-29 16:29:19 -05:00
Error on circular constraints in mapped types
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user