diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 5b57556af00..6cb5858f8ee 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2060,11 +2060,11 @@ "category": "Error", "code": 5054 }, - "Cannot write file '{0}' which is one of the input files.": { + "Cannot write file '{0}' because it would overwrite input file.": { "category": "Error", "code": 5055 }, - "Cannot write file '{0}' since one or more input files would emit into it.": { + "Cannot write file '{0}' because it would be overwritten by multiple input files.": { "category": "Error", "code": 5056 }, diff --git a/src/compiler/program.ts b/src/compiler/program.ts index a029a481d19..0fab35dacb3 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1289,20 +1289,20 @@ namespace ts { forEachKey(emitFilesSeen, emitFilePath => { // Report error if the output overwrites input file if (hasFile(files, emitFilePath)) { - createEmitBlockingDiagnostics(emitFilePath, Diagnostics.Cannot_write_file_0_which_is_one_of_the_input_files); + createEmitBlockingDiagnostics(emitFilePath, Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file); } // Report error if multiple files write into same file (except if specified by --out or --outFile) if (emitFilePath !== (options.outFile || options.out)) { // Not --out or --outFile emit, There should be single file emitting to this file if (emitFilesSeen[emitFilePath].length > 1) { - createEmitBlockingDiagnostics(emitFilePath, Diagnostics.Cannot_write_file_0_since_one_or_more_input_files_would_emit_into_it); + createEmitBlockingDiagnostics(emitFilePath, Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files); } } else { // --out or --outFile, error if there exist file emitting to single file colliding with --out if (forEach(emitFilesSeen[emitFilePath], sourceFile => shouldEmitToOwnFile(sourceFile, options))) { - createEmitBlockingDiagnostics(emitFilePath, Diagnostics.Cannot_write_file_0_since_one_or_more_input_files_would_emit_into_it); + createEmitBlockingDiagnostics(emitFilePath, Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files); } } }); diff --git a/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline b/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline index 5db889dc01d..f9bcca268ec 100644 --- a/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline +++ b/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline @@ -1,6 +1,6 @@ EmitSkipped: true Diagnostics: - Cannot write file 'tests/cases/fourslash/b.js' which is one of the input files. + Cannot write file 'tests/cases/fourslash/b.js' because it would overwrite input file. EmitSkipped: false FileName : tests/cases/fourslash/a.js diff --git a/tests/baselines/reference/declarationFileOverwriteError.errors.txt b/tests/baselines/reference/declarationFileOverwriteError.errors.txt index fbf4948c203..a12c60482e9 100644 --- a/tests/baselines/reference/declarationFileOverwriteError.errors.txt +++ b/tests/baselines/reference/declarationFileOverwriteError.errors.txt @@ -1,7 +1,7 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.d.ts' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.d.ts' because it would overwrite input file. -!!! error TS5055: Cannot write file 'a.d.ts' which is one of the input files. +!!! error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. ==== tests/cases/compiler/a.d.ts (0 errors) ==== declare class c { diff --git a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt index b90bccbaf94..02251900345 100644 --- a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt +++ b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt @@ -1,7 +1,7 @@ -error TS5055: Cannot write file 'tests/cases/compiler/out.d.ts' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/out.d.ts' because it would overwrite input file. -!!! error TS5055: Cannot write file 'out.d.ts' which is one of the input files. +!!! error TS5055: Cannot write file 'out.d.ts' because it would overwrite input file. ==== tests/cases/compiler/out.d.ts (0 errors) ==== declare class c { diff --git a/tests/baselines/reference/filesEmittingIntoSameOutput.errors.txt b/tests/baselines/reference/filesEmittingIntoSameOutput.errors.txt index 3a4c7eaad45..013a1445b0d 100644 --- a/tests/baselines/reference/filesEmittingIntoSameOutput.errors.txt +++ b/tests/baselines/reference/filesEmittingIntoSameOutput.errors.txt @@ -1,7 +1,7 @@ -error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. +error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. -!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. +!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.errors.txt b/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.errors.txt index 77cd91b9a7f..087a159a9bf 100644 --- a/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.errors.txt +++ b/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.errors.txt @@ -1,7 +1,7 @@ -error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. +error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. -!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. +!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. ==== tests/cases/compiler/a.ts (0 errors) ==== export class c { } diff --git a/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt index b0732afea72..19bfd5d1c02 100644 --- a/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,1): error TS8009: 'declare' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== declare var v; ~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt index b7fec2eefc6..a39d2e1665c 100644 --- a/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationDecoratorSyntax.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,1): error TS8017: 'decorators' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== @internal class C { } ~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt b/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt index 5861e73f49b..0aa9d5733d5 100644 --- a/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt +++ b/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt @@ -1,9 +1,9 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. -error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. -!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt index e9fd9cc31b7..538dfb38972 100644 --- a/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,6): error TS8015: 'enum declarations' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== enum E { } ~ diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt index 433a3c6b7be..641731936f8 100644 --- a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt @@ -1,9 +1,9 @@ error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. -error TS5055: Cannot write file 'tests/cases/compiler/c.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/c.js' because it would overwrite input file. !!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. -!!! error TS5055: Cannot write file 'tests/cases/compiler/c.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/c.js' because it would overwrite input file. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt index 27371222dce..f537941c55c 100644 --- a/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,1): error TS8003: 'export=' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== export = b; ~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt index c7d080404a2..33b8a45f1aa 100644 --- a/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,9): error TS8005: 'implements clauses' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== class C implements D { } ~~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt index 36ab7aab188..b4161367037 100644 --- a/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,1): error TS8002: 'import ... =' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== import a = b; ~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt index 3089aeecb49..17fb8fcb187 100644 --- a/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,11): error TS8006: 'interface declarations' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== interface I { } ~ diff --git a/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt index d85819b8588..662028c53ed 100644 --- a/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,8): error TS8007: 'module declarations' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== module M { } ~ diff --git a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt index 06bfd61c7ab..f2f4142b993 100644 --- a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt +++ b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt @@ -1,7 +1,7 @@ -error TS5055: Cannot write file 'tests/cases/compiler/c.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/c.js' because it would overwrite input file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/c.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/c.js' because it would overwrite input file. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt b/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt index 6d9e3c5919d..295f827dd2d 100644 --- a/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt +++ b/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,13): error TS8009: '?' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== function F(p?) { } ~ diff --git a/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt index 5a35e68bcec..fd5ea666459 100644 --- a/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationPropertySyntaxOfClass.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,11): error TS8014: 'property declarations' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== class C { v } ~ diff --git a/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt index a6d47e5fbe3..d67c9baea70 100644 --- a/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(2,5): error TS8009: 'public' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== class C { public foo() { diff --git a/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt b/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt index fa3e0e34a77..bc4913f6217 100644 --- a/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt +++ b/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,23): error TS8012: 'parameter modifiers' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== class C { constructor(public x) { }} ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt b/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt index 8b83a9d1f90..6dad5a29485 100644 --- a/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt +++ b/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,15): error TS8010: 'types' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== function F(): number { } ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt b/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt index b06375e8a6a..6e55ff30f04 100644 --- a/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt +++ b/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(3,6): error TS1223: 'type' tag already specified. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== /** * @type {number} diff --git a/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt index a0724e452b7..bc4d8e903ad 100644 --- a/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,1): error TS8008: 'type aliases' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== type a = b; ~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt b/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt index acefc2ff569..8ac59196ed9 100644 --- a/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,5): error TS8011: 'type arguments' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== Foo(); ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt index 50d6416a62b..e73ee46fb89 100644 --- a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,10): error TS8016: 'type assertion expressions' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== var v = undefined; ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt b/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt index 69fa6251942..680b32a64f1 100644 --- a/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,15): error TS8010: 'types' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== function F(a: number) { } ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt index f279896c4ed..161c832ffd5 100644 --- a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,9): error TS8004: 'type parameter declarations' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== class C { } ~ diff --git a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt index 9b056bcae50..d7626f68564 100644 --- a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,12): error TS8004: 'type parameter declarations' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== function F() { } ~ diff --git a/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt b/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt index 080cb580bf2..2c6ac3771be 100644 --- a/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. tests/cases/compiler/a.js(1,8): error TS8010: 'types' can only be used in a .ts file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. ==== tests/cases/compiler/a.js (1 errors) ==== var v: () => number; ~~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt b/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt index a9c60c0748f..84900bccc88 100644 --- a/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt @@ -1,7 +1,7 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.d.ts' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/a.d.ts' because it would overwrite input file. -!!! error TS5055: Cannot write file 'a.d.ts' which is one of the input files. +!!! error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt b/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt index 134c95dee15..4cc2cc2ab45 100644 --- a/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt @@ -1,9 +1,9 @@ -error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. -error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. +error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. -!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' which is one of the input files. -!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' since one or more input files would emit into it. +!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file. +!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt index a97dc2c3cd6..06186b9f0b2 100644 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. -!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. !!! error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. ==== tests/cases/compiler/a.ts (0 errors) ==== diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt index a97dc2c3cd6..06186b9f0b2 100644 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt @@ -1,8 +1,8 @@ -error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. -!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. !!! error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. ==== tests/cases/compiler/a.ts (0 errors) ==== diff --git a/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt b/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt index ed23a30c3fa..826f906538f 100644 --- a/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt @@ -1,7 +1,7 @@ -error TS5055: Cannot write file 'tests/cases/compiler/b.d.ts' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/b.d.ts' because it would overwrite input file. -!!! error TS5055: Cannot write file 'b.d.ts' which is one of the input files. +!!! error TS5055: Cannot write file 'b.d.ts' because it would overwrite input file. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt b/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt index 3531296e019..0f6852b21a0 100644 --- a/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt @@ -1,7 +1,7 @@ -error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt b/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt index 3531296e019..0f6852b21a0 100644 --- a/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt @@ -1,7 +1,7 @@ -error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. -!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' which is one of the input files. +!!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' because it would overwrite input file. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { }