fix: internal createSignature support undefined declaration (#44109)

This commit is contained in:
ZYSzys
2021-05-24 21:50:20 +08:00
committed by GitHub
parent 6df16b35f2
commit eb7c1ada6f
2 changed files with 2 additions and 3 deletions

View File

@@ -1135,8 +1135,7 @@ namespace ts.codefix {
parameters.push(symbol);
}
const returnType = combineFromUsage(combineUsages(calls.map(call => call.return_)));
// TODO: GH#18217
return checker.createSignature(/*declaration*/ undefined!, /*typeParameters*/ undefined, /*thisParameter*/ undefined, parameters, returnType, /*typePredicate*/ undefined, length, SignatureFlags.None);
return checker.createSignature(/*declaration*/ undefined, /*typeParameters*/ undefined, /*thisParameter*/ undefined, parameters, returnType, /*typePredicate*/ undefined, length, SignatureFlags.None);
}
function addCandidateType(usage: Usage, type: Type | undefined) {