We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da32f2b commit 1575b7aCopy full SHA for 1575b7a
src/compiler/checker.ts
@@ -7395,7 +7395,7 @@ namespace ts {
7395
7396
function getConstrainedTypeVariable(typeVariable: TypeVariable, node: Node) {
7397
let constraints: Type[];
7398
- while (isPartOfTypeNode(node)) {
+ while (node && !isStatement(node)) {
7399
const parent = node.parent;
7400
if (parent.kind === SyntaxKind.ConditionalType && node === (<ConditionalTypeNode>parent).trueType) {
7401
const constraint = getImpliedConstraint(typeVariable, (<ConditionalTypeNode>parent).checkType, (<ConditionalTypeNode>parent).extendsType);
0 commit comments