@@ -92,7 +92,7 @@ namespace ts.codefix {
92
92
classDeclarationSourceFile ,
93
93
classDeclaration ,
94
94
staticInitialization ,
95
- { suffix : context . newLineCharacter } ) ;
95
+ { prefix : context . newLineCharacter , suffix : context . newLineCharacter } ) ;
96
96
const initializeStaticAction = {
97
97
description : formatStringFromArgs ( getLocaleSpecificMessage ( Diagnostics . Initialize_static_property_0 ) , [ tokenName ] ) ,
98
98
changes : staticInitializationChangeTracker . getChanges ( )
@@ -112,11 +112,11 @@ namespace ts.codefix {
112
112
createIdentifier ( "undefined" ) ) ) ;
113
113
114
114
const propertyInitializationChangeTracker = textChanges . ChangeTracker . fromContext ( context ) ;
115
- propertyInitializationChangeTracker . insertNodeAt (
115
+ propertyInitializationChangeTracker . insertNodeBefore (
116
116
classDeclarationSourceFile ,
117
- classConstructor . body . getEnd ( ) - 1 ,
117
+ classConstructor . body . getLastToken ( ) ,
118
118
propertyInitialization ,
119
- { prefix : context . newLineCharacter , suffix : context . newLineCharacter } ) ;
119
+ { suffix : context . newLineCharacter } ) ;
120
120
121
121
const initializeAction = {
122
122
description : formatStringFromArgs ( getLocaleSpecificMessage ( Diagnostics . Initialize_property_0_in_the_constructor ) , [ tokenName ] ) ,
0 commit comments