@@ -92,7 +92,7 @@ namespace ts.codefix {
9292 classDeclarationSourceFile ,
9393 classDeclaration ,
9494 staticInitialization ,
95- { suffix : context . newLineCharacter } ) ;
95+ { prefix : context . newLineCharacter , suffix : context . newLineCharacter } ) ;
9696 const initializeStaticAction = {
9797 description : formatStringFromArgs ( getLocaleSpecificMessage ( Diagnostics . Initialize_static_property_0 ) , [ tokenName ] ) ,
9898 changes : staticInitializationChangeTracker . getChanges ( )
@@ -112,11 +112,11 @@ namespace ts.codefix {
112112 createIdentifier ( "undefined" ) ) ) ;
113113
114114 const propertyInitializationChangeTracker = textChanges . ChangeTracker . fromContext ( context ) ;
115- propertyInitializationChangeTracker . insertNodeAt (
115+ propertyInitializationChangeTracker . insertNodeBefore (
116116 classDeclarationSourceFile ,
117- classConstructor . body . getEnd ( ) - 1 ,
117+ classConstructor . body . getLastToken ( ) ,
118118 propertyInitialization ,
119- { prefix : context . newLineCharacter , suffix : context . newLineCharacter } ) ;
119+ { suffix : context . newLineCharacter } ) ;
120120
121121 const initializeAction = {
122122 description : formatStringFromArgs ( getLocaleSpecificMessage ( Diagnostics . Initialize_property_0_in_the_constructor ) , [ tokenName ] ) ,
0 commit comments