mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 22:32:33 -05:00
fix: change deprecated FunctionLike type to SignatureDeclaration (#40795)
This commit is contained in:
@@ -222,7 +222,7 @@ namespace ts.codefix {
|
||||
importAdder: ImportAdder,
|
||||
sourceFile: SourceFile,
|
||||
parameterDeclaration: ParameterDeclaration,
|
||||
containingFunction: FunctionLike,
|
||||
containingFunction: SignatureDeclaration,
|
||||
program: Program,
|
||||
host: LanguageServiceHost,
|
||||
cancellationToken: CancellationToken,
|
||||
@@ -268,7 +268,7 @@ namespace ts.codefix {
|
||||
}
|
||||
}
|
||||
|
||||
function annotateJSDocThis(changes: textChanges.ChangeTracker, sourceFile: SourceFile, containingFunction: FunctionLike, typeNode: TypeNode) {
|
||||
function annotateJSDocThis(changes: textChanges.ChangeTracker, sourceFile: SourceFile, containingFunction: SignatureDeclaration, typeNode: TypeNode) {
|
||||
addJSDocTags(changes, sourceFile, containingFunction, [
|
||||
factory.createJSDocThisTag(/*tagName*/ undefined, factory.createJSDocTypeExpression(typeNode)),
|
||||
]);
|
||||
@@ -409,7 +409,7 @@ namespace ts.codefix {
|
||||
}));
|
||||
}
|
||||
|
||||
function getFunctionReferences(containingFunction: FunctionLike, sourceFile: SourceFile, program: Program, cancellationToken: CancellationToken): readonly Identifier[] | undefined {
|
||||
function getFunctionReferences(containingFunction: SignatureDeclaration, sourceFile: SourceFile, program: Program, cancellationToken: CancellationToken): readonly Identifier[] | undefined {
|
||||
let searchToken;
|
||||
switch (containingFunction.kind) {
|
||||
case SyntaxKind.Constructor:
|
||||
@@ -534,7 +534,7 @@ namespace ts.codefix {
|
||||
return combineTypes(inferTypesFromReferencesSingle(references));
|
||||
}
|
||||
|
||||
function parameters(declaration: FunctionLike): ParameterInference[] | undefined {
|
||||
function parameters(declaration: SignatureDeclaration): ParameterInference[] | undefined {
|
||||
if (references.length === 0 || !declaration.parameters) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user