@@ -41,11 +41,11 @@ namespace ts {
4141 }
4242
4343 if ( node ) {
44- const { pos, end } = node . commentRange || node ;
45- const emitFlags = node . emitFlags ;
44+ const { pos, end } = getCommentRange ( node ) ;
45+ const emitFlags = getEmitFlags ( node ) ;
4646 if ( ( pos < 0 && end < 0 ) || ( pos === end ) ) {
4747 // Both pos and end are synthesized, so just emit the node without comments.
48- if ( emitFlags & NodeEmitFlags . NoNestedComments ) {
48+ if ( emitFlags & EmitFlags . NoNestedComments ) {
4949 disableCommentsAndEmit ( node , emitCallback ) ;
5050 }
5151 else {
@@ -58,8 +58,8 @@ namespace ts {
5858 }
5959
6060 const isEmittedNode = node . kind !== SyntaxKind . NotEmittedStatement ;
61- const skipLeadingComments = pos < 0 || ( emitFlags & NodeEmitFlags . NoLeadingComments ) !== 0 ;
62- const skipTrailingComments = end < 0 || ( emitFlags & NodeEmitFlags . NoTrailingComments ) !== 0 ;
61+ const skipLeadingComments = pos < 0 || ( emitFlags & EmitFlags . NoLeadingComments ) !== 0 ;
62+ const skipTrailingComments = end < 0 || ( emitFlags & EmitFlags . NoTrailingComments ) !== 0 ;
6363
6464 // Emit leading comments if the position is not synthesized and the node
6565 // has not opted out from emitting leading comments.
@@ -90,7 +90,7 @@ namespace ts {
9090 performance . measure ( "commentTime" , "preEmitNodeWithComment" ) ;
9191 }
9292
93- if ( emitFlags & NodeEmitFlags . NoNestedComments ) {
93+ if ( emitFlags & EmitFlags . NoNestedComments ) {
9494 disableCommentsAndEmit ( node , emitCallback ) ;
9595 }
9696 else {
@@ -125,9 +125,9 @@ namespace ts {
125125 }
126126
127127 const { pos, end } = detachedRange ;
128- const emitFlags = node . emitFlags ;
129- const skipLeadingComments = pos < 0 || ( emitFlags & NodeEmitFlags . NoLeadingComments ) !== 0 ;
130- const skipTrailingComments = disabled || end < 0 || ( emitFlags & NodeEmitFlags . NoTrailingComments ) !== 0 ;
128+ const emitFlags = getEmitFlags ( node ) ;
129+ const skipLeadingComments = pos < 0 || ( emitFlags & EmitFlags . NoLeadingComments ) !== 0 ;
130+ const skipTrailingComments = disabled || end < 0 || ( emitFlags & EmitFlags . NoTrailingComments ) !== 0 ;
131131
132132 if ( ! skipLeadingComments ) {
133133 emitDetachedCommentsAndUpdateCommentsInfo ( detachedRange ) ;
@@ -137,7 +137,7 @@ namespace ts {
137137 performance . measure ( "commentTime" , "preEmitBodyWithDetachedComments" ) ;
138138 }
139139
140- if ( emitFlags & NodeEmitFlags . NoNestedComments ) {
140+ if ( emitFlags & EmitFlags . NoNestedComments ) {
141141 disableCommentsAndEmit ( node , emitCallback ) ;
142142 }
143143 else {
0 commit comments