mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-14 19:16:17 -06:00
Code review comments
This commit is contained in:
parent
1fbbeadaf7
commit
798062944b
@ -31,7 +31,7 @@ namespace ts.codefix {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const isStatic = hasModifier(getThisContainer(token, /*includeArrowFunctions*/ false), ModifierFlags.Static);
|
||||
const isStatic = hasModifier(classMemberDeclaration, ModifierFlags.Static);
|
||||
|
||||
return isInJavaScriptFile(sourceFile) ? getActionsForAddMissingMemberInJavaScriptFile() : getActionsForAddMissingMemberInTypeScriptFile();
|
||||
|
||||
@ -54,7 +54,7 @@ namespace ts.codefix {
|
||||
fileName: sourceFile.fileName,
|
||||
textChanges: [{
|
||||
span: { start: startPos, length: 0 },
|
||||
newText: `${isStatic ? "static " : ""}${token.getFullText(sourceFile)}: ${typeString};`
|
||||
newText: `${isStatic ? "static " : ""}${token.getText(sourceFile)}: ${typeString};`
|
||||
}]
|
||||
}]
|
||||
}];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user