@@ -35,7 +35,7 @@ namespace ts.codefix {
35
35
precedingNode = ctorDeclaration . parent . parent ;
36
36
newClassDeclaration = createClassFromVariableDeclaration ( ctorDeclaration as VariableDeclaration ) ;
37
37
if ( ( < VariableDeclarationList > ctorDeclaration . parent ) . declarations . length === 1 ) {
38
- copyComments ( precedingNode , newClassDeclaration ! , sourceFile ) ; // TODO: GH#18217
38
+ copyLeadingComments ( precedingNode , newClassDeclaration ! , sourceFile ) ; // TODO: GH#18217
39
39
changes . delete ( sourceFile , precedingNode ) ;
40
40
}
41
41
else {
@@ -48,7 +48,7 @@ namespace ts.codefix {
48
48
return undefined ;
49
49
}
50
50
51
- copyComments ( ctorDeclaration , newClassDeclaration , sourceFile ) ;
51
+ copyLeadingComments ( ctorDeclaration , newClassDeclaration , sourceFile ) ;
52
52
53
53
// Because the preceding node could be touched, we need to insert nodes before delete nodes.
54
54
changes . insertNodeAfter ( sourceFile , precedingNode ! , newClassDeclaration ) ;
@@ -112,7 +112,7 @@ namespace ts.codefix {
112
112
const fullModifiers = concatenate ( modifiers , getModifierKindFromSource ( functionExpression , SyntaxKind . AsyncKeyword ) ) ;
113
113
const method = createMethod ( /*decorators*/ undefined , fullModifiers , /*asteriskToken*/ undefined , memberDeclaration . name , /*questionToken*/ undefined ,
114
114
/*typeParameters*/ undefined , functionExpression . parameters , /*type*/ undefined , functionExpression . body ) ;
115
- copyComments ( assignmentBinaryExpression , method , sourceFile ) ;
115
+ copyLeadingComments ( assignmentBinaryExpression , method , sourceFile ) ;
116
116
return method ;
117
117
}
118
118
@@ -132,7 +132,7 @@ namespace ts.codefix {
132
132
const fullModifiers = concatenate ( modifiers , getModifierKindFromSource ( arrowFunction , SyntaxKind . AsyncKeyword ) ) ;
133
133
const method = createMethod ( /*decorators*/ undefined , fullModifiers , /*asteriskToken*/ undefined , memberDeclaration . name , /*questionToken*/ undefined ,
134
134
/*typeParameters*/ undefined , arrowFunction . parameters , /*type*/ undefined , bodyBlock ) ;
135
- copyComments ( assignmentBinaryExpression , method , sourceFile ) ;
135
+ copyLeadingComments ( assignmentBinaryExpression , method , sourceFile ) ;
136
136
return method ;
137
137
}
138
138
@@ -143,7 +143,7 @@ namespace ts.codefix {
143
143
}
144
144
const prop = createProperty ( /*decorators*/ undefined , modifiers , memberDeclaration . name , /*questionToken*/ undefined ,
145
145
/*type*/ undefined , assignmentBinaryExpression . right ) ;
146
- copyComments ( assignmentBinaryExpression . parent , prop , sourceFile ) ;
146
+ copyLeadingComments ( assignmentBinaryExpression . parent , prop , sourceFile ) ;
147
147
return prop ;
148
148
}
149
149
}
0 commit comments