mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Fix parent node walk termination condition in getConstrainedTypeVariable
This commit is contained in:
1 parent
da32f2b4f1
commit
1575b7a77e
1 file changed
+1
-1
@@ -7395,7 +7395,7 @@ namespace ts {
|
||||
|
||||
function getConstrainedTypeVariable(typeVariable: TypeVariable, node: Node) {
|
||||
let constraints: Type[];
|
||||
while (isPartOfTypeNode(node)) {
|
||||
while (node && !isStatement(node)) {
|
||||
const parent = node.parent;
|
||||
if (parent.kind === SyntaxKind.ConditionalType && node === (<ConditionalTypeNode>parent).trueType) {
|
||||
const constraint = getImpliedConstraint(typeVariable, (<ConditionalTypeNode>parent).checkType, (<ConditionalTypeNode>parent).extendsType);
|
||||
|
||||
Reference in new issue
Block a user