mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-17 19:11:26 -06:00
Error on circular constraints in mapped types
This commit is contained in:
parent
398244177d
commit
47cf1ff5fc
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user