mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00: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:
1 parent
867470ca26
commit
d8ac54bfb1
9 files changed
+126
-1
No files matched your search
@@ -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