File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2074,7 +2074,7 @@ namespace ts {
20742074 writeLine ( ) ;
20752075 const statements = node . statements ;
20762076 if ( emitBodyWithDetachedComments ) {
2077- // Emit detached comment if there iare no prologue directives or this is a synthesized prologue directives .
2077+ // Emit detached comment if there are no prologue directives or if the first node is synthesized .
20782078 // The synthesized node will have no leading comment so some comments may be missed.
20792079 const shouldEmitDetachedComment = statements . length === 0 ||
20802080 ! isPrologueDirective ( statements [ 0 ] ) ||
@@ -2136,10 +2136,10 @@ namespace ts {
21362136 emitPrologueDirectives ( ( sourceFileOrBundle as SourceFile ) . statements ) ;
21372137 }
21382138 else {
2139- const seenProgolueDirectives = createMap < String > ( ) ;
2139+ const seenPrologueDirectives = createMap < String > ( ) ;
21402140 for ( const sourceFile of ( sourceFileOrBundle as Bundle ) . sourceFiles ) {
21412141 setSourceFile ( sourceFile ) ;
2142- emitPrologueDirectives ( sourceFile . statements , /*startWithNewLine*/ true , seenProgolueDirectives ) ;
2142+ emitPrologueDirectives ( sourceFile . statements , /*startWithNewLine*/ true , seenPrologueDirectives ) ;
21432143 }
21442144 }
21452145 }
You can’t perform that action at this time.
0 commit comments