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.
instantiateSignatureInContextOf
1 parent ff145a7 commit e0c876eCopy full SHA for e0c876e
src/compiler/checker.ts
@@ -14896,6 +14896,8 @@ namespace ts {
14896
});
14897
const inferred = getInferredTypes(context);
14898
for (let i = 0; i < inferred.length; ++i) {
14899
+ // If inference has failed, use the first constituent type. During checking, the other
14900
+ // constituents will fail to match, resulting in a nice error message pointing it out.
14901
if (inferred[i] === unknownType) {
14902
inferred[i] = getInferenceCandidates(context, i)[0] || inferred[i];
14903
}
0 commit comments