@@ -42,9 +42,6 @@ type emitter struct {
4242}
4343
4444func (e * emitter ) emit () {
45- if e .host .Options ().ListEmittedFiles .IsTrue () {
46- e .emitResult .EmittedFiles = []string {}
47- }
4845 // !!! tracing
4946 e .emitJSFile (e .sourceFile , e .paths .JsFilePath (), e .paths .SourceMapFilePath ())
5047 e .emitDeclarationFile (e .sourceFile , e .paths .DeclarationFilePath (), e .paths .DeclarationMapPath ())
@@ -254,7 +251,7 @@ func (e *emitter) printSourceFile(jsFilePath string, sourceMapFilePath string, s
254251 err := e .host .WriteFile (sourceMapFilePath , sourceMap , false /*writeByteOrderMark*/ )
255252 if err != nil {
256253 e .emitterDiagnostics .Add (ast .NewCompilerDiagnostic (diagnostics .Could_not_write_file_0_Colon_1 , jsFilePath , err .Error ()))
257- } else if e . emitResult . EmittedFiles != nil {
254+ } else {
258255 e .emitResult .EmittedFiles = append (e .emitResult .EmittedFiles , sourceMapFilePath )
259256 }
260257 }
@@ -278,7 +275,7 @@ func (e *emitter) printSourceFile(jsFilePath string, sourceMapFilePath string, s
278275 }
279276 if err != nil {
280277 e .emitterDiagnostics .Add (ast .NewCompilerDiagnostic (diagnostics .Could_not_write_file_0_Colon_1 , jsFilePath , err .Error ()))
281- } else if e . emitResult . EmittedFiles != nil && ! skippedDtsWrite {
278+ } else if ! skippedDtsWrite {
282279 e .emitResult .EmittedFiles = append (e .emitResult .EmittedFiles , jsFilePath )
283280 }
284281
0 commit comments