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:
Andrew Branch authored and GitHub committed 2022-02-07 15:53:13 -08:00
1 parent 867470ca26
commit d8ac54bfb1
9 files changed
+126 -1

No files matched your search

+1 -1
View File
@@ -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;
}