feat(51163): show QF to fill in the missing properties for the mapped type. (#51165)

This commit is contained in:
Oleksandr T
2022-10-13 21:29:18 +03:00
committed by GitHub
parent bdcc240d68
commit cf1b6b7333
2 changed files with 28 additions and 1 deletions

View File

@@ -178,7 +178,7 @@ namespace ts.codefix {
const argIndex = findIndex(parent.parent.arguments, arg => arg === parent);
if (argIndex < 0) return undefined;
const signature = singleOrUndefined(checker.getSignaturesOfType(checker.getTypeAtLocation(parent.parent.expression), SignatureKind.Call));
const signature = checker.getResolvedSignature(parent.parent);
if (!(signature && signature.declaration && signature.parameters[argIndex])) return undefined;
const param = signature.parameters[argIndex].valueDeclaration;