(emitFileName, emitFilesSeen)
| 118915 | } |
| 118916 | // Verify that all the emit files are unique and don't overwrite input files |
| 118917 | function verifyEmitFilePath(emitFileName, emitFilesSeen) { |
| 118918 | if (emitFileName) { |
| 118919 | var emitFilePath = toPath(emitFileName); |
| 118920 | // Report error if the output overwrites input file |
| 118921 | if (filesByName.has(emitFilePath)) { |
| 118922 | var chain = void 0; |
| 118923 | if (!options.configFilePath) { |
| 118924 | // The program is from either an inferred project or an external project |
| 118925 | chain = ts.chainDiagnosticMessages(/*details*/ undefined, ts.Diagnostics.Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig); |
| 118926 | } |
| 118927 | chain = ts.chainDiagnosticMessages(chain, ts.Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file, emitFileName); |
| 118928 | blockEmittingOfFile(emitFileName, ts.createCompilerDiagnosticFromMessageChain(chain)); |
| 118929 | } |
| 118930 | var emitFileKey = !host.useCaseSensitiveFileNames() ? ts.toFileNameLowerCase(emitFilePath) : emitFilePath; |
| 118931 | // Report error if multiple files write into same file |
| 118932 | if (emitFilesSeen.has(emitFileKey)) { |
| 118933 | // Already seen the same emit file - report error |
| 118934 | blockEmittingOfFile(emitFileName, ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files, emitFileName)); |
| 118935 | } |
| 118936 | else { |
| 118937 | emitFilesSeen.add(emitFileKey); |
| 118938 | } |
| 118939 | } |
| 118940 | } |
| 118941 | } |
| 118942 | function createDiagnosticExplainingFile(file, fileProcessingReason, diagnostic, args) { |
| 118943 | var _a; |
no test coverage detected
searching dependent graphs…