Skip to content

Commit 7980629

Browse files
committed
Code review comments
1 parent 1fbbead commit 7980629

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/codefixes/fixAddMissingMember.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace ts.codefix {
3131
return undefined;
3232
}
3333

34-
const isStatic = hasModifier(getThisContainer(token, /*includeArrowFunctions*/ false), ModifierFlags.Static);
34+
const isStatic = hasModifier(classMemberDeclaration, ModifierFlags.Static);
3535

3636
return isInJavaScriptFile(sourceFile) ? getActionsForAddMissingMemberInJavaScriptFile() : getActionsForAddMissingMemberInTypeScriptFile();
3737

@@ -54,7 +54,7 @@ namespace ts.codefix {
5454
fileName: sourceFile.fileName,
5555
textChanges: [{
5656
span: { start: startPos, length: 0 },
57-
newText: `${isStatic ? "static " : ""}${token.getFullText(sourceFile)}: ${typeString};`
57+
newText: `${isStatic ? "static " : ""}${token.getText(sourceFile)}: ${typeString};`
5858
}]
5959
}]
6060
}];

0 commit comments

Comments
 (0)