@@ -134,28 +134,30 @@ namespace ts {
134134 emitDeclarationFileOrBundle ( sourceFileOrBundle , declarationFilePath , declarationMapPath ) ;
135135
136136 if ( ! emitSkipped && emittedFilesList ) {
137- if ( ! emitOnlyDtsFiles ) {
138- emittedFilesList . push ( jsFilePath ) ;
139- }
140- if ( sourceMapFilePath ) {
141- emittedFilesList . push ( sourceMapFilePath ) ;
137+ if ( ! compilerOptions . emitDeclarationOnly ) {
138+ if ( ! emitOnlyDtsFiles ) {
139+ emittedFilesList . push ( jsFilePath ) ;
140+ }
141+ if ( sourceMapFilePath ) {
142+ emittedFilesList . push ( sourceMapFilePath ) ;
143+ }
144+ if ( bundleInfoPath ) {
145+ emittedFilesList . push ( bundleInfoPath ) ;
146+ }
142147 }
143148 if ( declarationFilePath ) {
144149 emittedFilesList . push ( declarationFilePath ) ;
145150 }
146- if ( bundleInfoPath ) {
147- emittedFilesList . push ( bundleInfoPath ) ;
148- }
149151 }
150152 }
151153
152154 function emitJsFileOrBundle ( sourceFileOrBundle : SourceFile | Bundle , jsFilePath : string , sourceMapFilePath : string | undefined , bundleInfoPath : string | undefined ) {
153155 // Make sure not to write js file and source map file if any of them cannot be written
154- if ( host . isEmitBlocked ( jsFilePath ) || compilerOptions . noEmit || compilerOptions . emitDeclarationOnly ) {
156+ if ( host . isEmitBlocked ( jsFilePath ) || compilerOptions . noEmit ) {
155157 emitSkipped = true ;
156158 return ;
157159 }
158- if ( emitOnlyDtsFiles ) {
160+ if ( emitOnlyDtsFiles || compilerOptions . emitDeclarationOnly ) {
159161 return ;
160162 }
161163 // Transform the source files
0 commit comments