parent
d03d237b3b
commit
686fd1e62d
|
@ -92,7 +92,7 @@ namespace ts.codefix {
|
|||
classDeclarationSourceFile,
|
||||
classDeclaration,
|
||||
staticInitialization,
|
||||
{ suffix: context.newLineCharacter });
|
||||
{ prefix: context.newLineCharacter, suffix: context.newLineCharacter });
|
||||
const initializeStaticAction = {
|
||||
description: formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Initialize_static_property_0), [tokenName]),
|
||||
changes: staticInitializationChangeTracker.getChanges()
|
||||
|
|
|
@ -13,11 +13,12 @@
|
|||
verify.codeFix({
|
||||
description: "Initialize static property 'foo'.",
|
||||
index: 0,
|
||||
// TODO: GH#18743 and GH#18445
|
||||
// TODO: GH#18445
|
||||
newFileContent: `class C {
|
||||
static method() {
|
||||
()=>{ this.foo === 10 };
|
||||
}
|
||||
}C.foo = undefined;\r
|
||||
}\r
|
||||
C.foo = undefined;\r
|
||||
`
|
||||
});
|
||||
|
|
|
@ -11,9 +11,10 @@
|
|||
verify.codeFix({
|
||||
description: "Initialize static property 'foo'.",
|
||||
index: 2,
|
||||
// TODO: GH#18743 and GH#18445
|
||||
// TODO: GH#18445
|
||||
newFileContent: `class C {
|
||||
static p = ()=>{ this.foo === 10 };
|
||||
}C.foo = undefined;\r
|
||||
}\r
|
||||
C.foo = undefined;\r
|
||||
`
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue