mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
Fix substitution types of indexed access types of substitution types (#47791)
* Fix substitution types of indexed access types of substitution types * Add tests * Fix accidental unindentation
This commit is contained in:
@@ -13506,7 +13506,7 @@ namespace ts {
|
||||
|
||||
function getImpliedConstraint(type: Type, checkNode: TypeNode, extendsNode: TypeNode): Type | undefined {
|
||||
return isUnaryTupleTypeNode(checkNode) && isUnaryTupleTypeNode(extendsNode) ? getImpliedConstraint(type, (checkNode as TupleTypeNode).elements[0], (extendsNode as TupleTypeNode).elements[0]) :
|
||||
getActualTypeVariable(getTypeFromTypeNode(checkNode)) === type ? getTypeFromTypeNode(extendsNode) :
|
||||
getActualTypeVariable(getTypeFromTypeNode(checkNode)) === getActualTypeVariable(type) ? getTypeFromTypeNode(extendsNode) :
|
||||
undefined;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user