fix(49478): add return type to method signature (#49482)

This commit is contained in:
Oleksandr T
2022-06-11 00:14:36 +03:00
committed by GitHub
parent e6808c4290
commit 806a710470
6 changed files with 43 additions and 4 deletions

View File

@@ -332,7 +332,7 @@ namespace ts.codefix {
/*questionToken*/ undefined,
typeParameters,
parameters,
type
type === undefined ? factory.createKeywordTypeNode(SyntaxKind.UnknownKeyword) : type
);
case SyntaxKind.FunctionDeclaration:
return factory.createFunctionDeclaration(

View File

@@ -682,7 +682,7 @@ namespace ts.textChanges {
return {
indentation,
prefix: (insertLeadingComma ? "," : "") + this.newLineCharacter,
suffix: insertTrailingComma ? "," : ""
suffix: insertTrailingComma ? "," : isInterfaceDeclaration(node) && isEmpty ? ";" : ""
};
}