mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
fix(50188): omit QF on function arguments (#50189)
This commit is contained in:
@@ -190,7 +190,7 @@ namespace ts.codefix {
|
||||
return { kind: InfoKind.JsxAttributes, token, attributes, parentDeclaration: token.parent };
|
||||
}
|
||||
|
||||
if (isIdentifier(token) && isCallExpression(parent)) {
|
||||
if (isIdentifier(token) && isCallExpression(parent) && parent.expression === token) {
|
||||
return { kind: InfoKind.Function, token, call: parent, sourceFile, modifierFlags: ModifierFlags.None, parentDeclaration: sourceFile };
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////declare function f(x: number): any;
|
||||
////f(foo);
|
||||
|
||||
verify.not.codeFixAvailable("fixMissingFunctionDeclaration");
|
||||
@@ -0,0 +1,8 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////const a = {
|
||||
//// b: { f(x: number) {} }
|
||||
////}
|
||||
////a.b.f(foo);
|
||||
|
||||
verify.not.codeFixAvailable("fixMissingFunctionDeclaration");
|
||||
Reference in New Issue
Block a user