diff --git a/internal/compiler/program.go b/internal/compiler/program.go index f773a45e59..a3f5464daa 100644 --- a/internal/compiler/program.go +++ b/internal/compiler/program.go @@ -1038,6 +1038,74 @@ func (p *Program) getSemanticDiagnosticsForFileNotFilter(ctx context.Context, so } diags := slices.Clip(sourceFile.BindDiagnostics()) + supportedExtensions := tsoptions.GetSupportedExtensions(p.opts.Config.CompilerOptions(), nil) + supportedExtensionsWithJsonIfResolveJsonModule := tsoptions.GetSupportedExtensionsWithJsonIfResolveJsonModule(p.opts.Config.CompilerOptions(), supportedExtensions) + + for _, ref := range sourceFile.ReferencedFiles { + fileName := ref.FileName + getSourceFile := func(fileName string) *ast.SourceFile { + resolvedPath := tspath.GetNormalizedAbsolutePath(fileName, tspath.GetDirectoryPath(sourceFile.FileName())) + canonicalPath := tspath.GetCanonicalFileName(resolvedPath, p.opts.Host.FS().UseCaseSensitiveFileNames()) + return p.filesByPath[tspath.Path(canonicalPath)] + } + + fail := func(diagnostic *diagnostics.Message, args ...string) { + argsAny := make([]any, len(args)) + for i, v := range args { + argsAny[i] = v + } + diags = append(diags, ast.NewDiagnostic( + sourceFile, + ref.TextRange, + diagnostic, + argsAny..., + )) + } + + if tspath.HasExtension(fileName) { + canonicalFileName := tspath.GetCanonicalFileName(fileName, p.opts.Host.FS().UseCaseSensitiveFileNames()) + if !core.Tristate.IsTrue(p.opts.Config.CompilerOptions().AllowNonTsExtensions) && !core.Some(core.Flatten(supportedExtensionsWithJsonIfResolveJsonModule), func(extension string) bool { + return tspath.FileExtensionIs(canonicalFileName, extension) + }) { + if tspath.HasJSFileExtension(canonicalFileName) { + fail(diagnostics.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option, fileName) + } else { + fail(diagnostics.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'"+strings.Join(core.Flatten(supportedExtensions), "', '")+"'") + } + continue + } + + referencedFile := getSourceFile(fileName) + switch referencedFile { + case nil: + // !!! check for redirect + fail(diagnostics.File_0_not_found, fileName) + case sourceFile: + fail(diagnostics.A_file_cannot_have_a_reference_to_itself) + } + } else { + sourceFileNoExtension := core.Tristate.IsTrue(p.opts.Config.CompilerOptions().AllowNonTsExtensions) && getSourceFile(fileName) != nil + if sourceFileNoExtension { + continue + } + + if core.Tristate.IsTrue(p.opts.Config.CompilerOptions().AllowNonTsExtensions) { + fail(diagnostics.File_0_not_found, fileName) + continue + } + + // Only try adding extensions from the first supported group (which should be .ts/.tsx/.d.ts) + // supportedExtensions[0] corresponds to SupportedTSExtensions[0] in tspath + sourceFileWithAddedExtension := core.FirstNonNil(tspath.SupportedTSExtensions[0], func(extension string) *ast.SourceFile { + return getSourceFile(fileName + extension) + }) + + if sourceFileWithAddedExtension == nil { + fail(diagnostics.Could_not_resolve_the_path_0_with_the_extensions_Colon_1, fileName, "'"+strings.Join(core.Flatten(supportedExtensions), "', '")+"'") + } + } + } + // Ask for diags from all checkers; checking one file may add diagnostics to other files. // These are deduplicated later. checkerDiags := make([][]*ast.Diagnostic, p.checkerPool.Count()) diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInvalidReference.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationEmitInvalidReference.errors.txt new file mode 100644 index 0000000000..3410b755ed --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitInvalidReference.errors.txt @@ -0,0 +1,8 @@ +declarationEmitInvalidReference.ts(1,22): error TS6053: File 'invalid.ts' not found. + + +==== declarationEmitInvalidReference.ts (1 errors) ==== + /// + ~~~~~~~~~~ +!!! error TS6053: File 'invalid.ts' not found. + var x = 0; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInvalidReference.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitInvalidReference.errors.txt.diff new file mode 100644 index 0000000000..ec4fa6df36 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitInvalidReference.errors.txt.diff @@ -0,0 +1,12 @@ +--- old.declarationEmitInvalidReference.errors.txt ++++ new.declarationEmitInvalidReference.errors.txt +@@= skipped -0, +0 lines =@@ +- ++declarationEmitInvalidReference.ts(1,22): error TS6053: File 'invalid.ts' not found. ++ ++ ++==== declarationEmitInvalidReference.ts (1 errors) ==== ++ /// ++ ~~~~~~~~~~ ++!!! error TS6053: File 'invalid.ts' not found. ++ var x = 0; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInvalidReference2.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationEmitInvalidReference2.errors.txt new file mode 100644 index 0000000000..ab08b44a07 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitInvalidReference2.errors.txt @@ -0,0 +1,8 @@ +declarationEmitInvalidReference2.ts(1,22): error TS6053: File 'invalid.ts' not found. + + +==== declarationEmitInvalidReference2.ts (1 errors) ==== + /// + ~~~~~~~~~~ +!!! error TS6053: File 'invalid.ts' not found. + var x = 0; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInvalidReference2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitInvalidReference2.errors.txt.diff deleted file mode 100644 index ba50881c9f..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitInvalidReference2.errors.txt.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- old.declarationEmitInvalidReference2.errors.txt -+++ new.declarationEmitInvalidReference2.errors.txt -@@= skipped -0, +0 lines =@@ --declarationEmitInvalidReference2.ts(1,22): error TS6053: File 'invalid.ts' not found. -- -- --==== declarationEmitInvalidReference2.ts (1 errors) ==== -- /// -- ~~~~~~~~~~ --!!! error TS6053: File 'invalid.ts' not found. -- var x = 0; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInvalidReferenceAllowJs.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationEmitInvalidReferenceAllowJs.errors.txt new file mode 100644 index 0000000000..479336c006 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitInvalidReferenceAllowJs.errors.txt @@ -0,0 +1,9 @@ +declarationEmitInvalidReferenceAllowJs.ts(1,22): error TS6231: Could not resolve the path 'invalid' with the extensions: '.ts', '.tsx', '.d.ts', '.js', '.jsx', '.cts', '.d.cts', '.cjs', '.mts', '.d.mts', '.mjs'. + + +==== declarationEmitInvalidReferenceAllowJs.ts (1 errors) ==== + /// + ~~~~~~~ +!!! error TS6231: Could not resolve the path 'invalid' with the extensions: '.ts', '.tsx', '.d.ts', '.js', '.jsx', '.cts', '.d.cts', '.cjs', '.mts', '.d.mts', '.mjs'. + var x = 0; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInvalidReferenceAllowJs.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitInvalidReferenceAllowJs.errors.txt.diff deleted file mode 100644 index 784414cf18..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitInvalidReferenceAllowJs.errors.txt.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- old.declarationEmitInvalidReferenceAllowJs.errors.txt -+++ new.declarationEmitInvalidReferenceAllowJs.errors.txt -@@= skipped -0, +0 lines =@@ --declarationEmitInvalidReferenceAllowJs.ts(1,22): error TS6231: Could not resolve the path 'invalid' with the extensions: '.ts', '.tsx', '.d.ts', '.js', '.jsx', '.cts', '.d.cts', '.cjs', '.mts', '.d.mts', '.mjs'. -- -- --==== declarationEmitInvalidReferenceAllowJs.ts (1 errors) ==== -- /// -- ~~~~~~~ --!!! error TS6231: Could not resolve the path 'invalid' with the extensions: '.ts', '.tsx', '.d.ts', '.js', '.jsx', '.cts', '.d.cts', '.cjs', '.mts', '.d.mts', '.mjs'. -- var x = 0; -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.errors.txt b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.errors.txt index 6fe169252b..38fd2a696a 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.errors.txt @@ -1,11 +1,18 @@ +file2.ts:1:22 - error TS6231: Could not resolve the path './file1' with the extensions: '.ts', '.tsx', '.d.ts', '.cts', '.d.cts', '.mts', '.d.mts'. + +1 /// +   ~~~~~~~ + file2.ts:3:16 - error TS2664: Invalid module name in augmentation, module 'someMod' cannot be found. 3 declare module "someMod" {    ~~~~~~~~~ -==== file2.ts (1 errors) ==== +==== file2.ts (2 errors) ==== /// + ~~~~~~~ +!!! error TS6231: Could not resolve the path './file1' with the extensions: '.ts', '.tsx', '.d.ts', '.cts', '.d.cts', '.mts', '.d.mts'. declare module "someMod" { ~~~~~~~~~ @@ -26,5 +33,5 @@ duplicate3: () => string; } } -Found 1 error in file2.ts:3 +Found 2 errors in the same file, starting at: file2.ts:1 diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.errors.txt.diff index e6fb256ad7..7dde750aaa 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans6.errors.txt.diff @@ -58,14 +58,21 @@ - - -==== file2.ts (3 errors) ==== ++file2.ts:1:22 - error TS6231: Could not resolve the path './file1' with the extensions: '.ts', '.tsx', '.d.ts', '.cts', '.d.cts', '.mts', '.d.mts'. ++ ++1 /// ++   ~~~~~~~ ++ +file2.ts:3:16 - error TS2664: Invalid module name in augmentation, module 'someMod' cannot be found. + +3 declare module "someMod" { +   ~~~~~~~~~ + + -+==== file2.ts (1 errors) ==== ++==== file2.ts (2 errors) ==== /// ++ ~~~~~~~ ++!!! error TS6231: Could not resolve the path './file1' with the extensions: '.ts', '.tsx', '.d.ts', '.cts', '.d.cts', '.mts', '.d.mts'. declare module "someMod" { + ~~~~~~~~~ @@ -106,7 +113,7 @@ } } -Found 6 errors in 2 files. -+Found 1 error in file2.ts:3 ++Found 2 errors in the same file, starting at: file2.ts:1 -Errors Files - 3 file1.ts:3 diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.errors.txt b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.errors.txt index 11fcb89173..a1de85ebb1 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.errors.txt @@ -1,11 +1,18 @@ +file2.ts:1:22 - error TS6231: Could not resolve the path './file1' with the extensions: '.ts', '.tsx', '.d.ts', '.cts', '.d.cts', '.mts', '.d.mts'. + +1 /// +   ~~~~~~~ + file2.ts:3:16 - error TS2664: Invalid module name in augmentation, module 'someMod' cannot be found. 3 declare module "someMod" {    ~~~~~~~~~ -==== file2.ts (1 errors) ==== +==== file2.ts (2 errors) ==== /// + ~~~~~~~ +!!! error TS6231: Could not resolve the path './file1' with the extensions: '.ts', '.tsx', '.d.ts', '.cts', '.d.cts', '.mts', '.d.mts'. declare module "someMod" { ~~~~~~~~~ @@ -38,5 +45,5 @@ duplicate9: () => string; } } -Found 1 error in file2.ts:3 +Found 2 errors in the same file, starting at: file2.ts:1 diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.errors.txt.diff index 5ea72c878c..9051f5633c 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans7.errors.txt.diff @@ -11,6 +11,11 @@ -   ~~~~~~~ - Conflicts are in this file. -file2.ts:3:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: duplicate1, duplicate2, duplicate3, duplicate4, duplicate5, duplicate6, duplicate7, duplicate8, duplicate9 ++file2.ts:1:22 - error TS6231: Could not resolve the path './file1' with the extensions: '.ts', '.tsx', '.d.ts', '.cts', '.d.cts', '.mts', '.d.mts'. ++ ++1 /// ++   ~~~~~~~ ++ +file2.ts:3:16 - error TS2664: Invalid module name in augmentation, module 'someMod' cannot be found. 3 declare module "someMod" { @@ -20,11 +25,16 @@ - 1 declare module "someMod" { -   ~~~~~~~ - Conflicts are in this file. +- +- +-==== file2.ts (1 errors) ==== +   ~~~~~~~~~ - - - ==== file2.ts (1 errors) ==== ++ ++ ++==== file2.ts (2 errors) ==== /// ++ ~~~~~~~ ++!!! error TS6231: Could not resolve the path './file1' with the extensions: '.ts', '.tsx', '.d.ts', '.cts', '.d.cts', '.mts', '.d.mts'. declare module "someMod" { - ~~~~~~~ @@ -35,7 +45,7 @@ export interface TopLevel { duplicate1(): number; duplicate2(): number; -@@= skipped -38, +23 lines =@@ +@@= skipped -38, +30 lines =@@ } export {}; @@ -53,7 +63,7 @@ } } -Found 2 errors in 2 files. -+Found 1 error in file2.ts:3 ++Found 2 errors in the same file, starting at: file2.ts:1 -Errors Files - 1 file1.ts:1 diff --git a/testdata/baselines/reference/submodule/compiler/invalidTripleSlashReference.errors.txt b/testdata/baselines/reference/submodule/compiler/invalidTripleSlashReference.errors.txt new file mode 100644 index 0000000000..ee64719ef0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/invalidTripleSlashReference.errors.txt @@ -0,0 +1,14 @@ +invalidTripleSlashReference.ts(1,22): error TS6053: File 'filedoesnotexist.ts' not found. +invalidTripleSlashReference.ts(2,22): error TS6053: File 'otherdoesnotexist.d.ts' not found. + + +==== invalidTripleSlashReference.ts (2 errors) ==== + /// + ~~~~~~~~~~~~~~~~~~~ +!!! error TS6053: File 'filedoesnotexist.ts' not found. + /// + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS6053: File 'otherdoesnotexist.d.ts' not found. + + // this test doesn't actually give the errors you want due to the way the compiler reports errors + var x = 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/invalidTripleSlashReference.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/invalidTripleSlashReference.errors.txt.diff deleted file mode 100644 index dda05feefc..0000000000 --- a/testdata/baselines/reference/submodule/compiler/invalidTripleSlashReference.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.invalidTripleSlashReference.errors.txt -+++ new.invalidTripleSlashReference.errors.txt -@@= skipped -0, +0 lines =@@ --invalidTripleSlashReference.ts(1,22): error TS6053: File 'filedoesnotexist.ts' not found. --invalidTripleSlashReference.ts(2,22): error TS6053: File 'otherdoesnotexist.d.ts' not found. -- -- --==== invalidTripleSlashReference.ts (2 errors) ==== -- /// -- ~~~~~~~~~~~~~~~~~~~ --!!! error TS6053: File 'filedoesnotexist.ts' not found. -- /// -- ~~~~~~~~~~~~~~~~~~~~~~ --!!! error TS6053: File 'otherdoesnotexist.d.ts' not found. -- -- // this test doesn't actually give the errors you want due to the way the compiler reports errors -- var x = 1; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleAugmentationDuringSyntheticDefaultCheck.errors.txt b/testdata/baselines/reference/submodule/compiler/moduleAugmentationDuringSyntheticDefaultCheck.errors.txt new file mode 100644 index 0000000000..2a3f67b78a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/moduleAugmentationDuringSyntheticDefaultCheck.errors.txt @@ -0,0 +1,38 @@ +idx.test.ts(1,22): error TS6231: Could not resolve the path './idx' with the extensions: '.ts', '.tsx', '.d.ts', '.cts', '.d.cts', '.mts', '.d.mts'. + + +==== idx.test.ts (1 errors) ==== + /// + ~~~~~ +!!! error TS6231: Could not resolve the path './idx' with the extensions: '.ts', '.tsx', '.d.ts', '.cts', '.d.cts', '.mts', '.d.mts'. + + import moment = require("moment-timezone"); + +==== node_modules/moment/index.d.ts (0 errors) ==== + declare function moment(): moment.Moment; + declare namespace moment { + interface Moment extends Object { + valueOf(): number; + } + } + export = moment; +==== node_modules/moment-timezone/index.d.ts (0 errors) ==== + import * as moment from 'moment'; + export = moment; + declare module "moment" { + interface Moment { + tz(): string; + } + } +==== idx.ts (0 errors) ==== + import * as _moment from "moment"; + declare module "moment" { + interface Moment { + strftime(pattern: string): string; + } + } + declare module "moment-timezone" { + interface Moment { + strftime(pattern: string): string; + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleAugmentationDuringSyntheticDefaultCheck.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleAugmentationDuringSyntheticDefaultCheck.errors.txt.diff new file mode 100644 index 0000000000..5b60cbebbc --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/moduleAugmentationDuringSyntheticDefaultCheck.errors.txt.diff @@ -0,0 +1,42 @@ +--- old.moduleAugmentationDuringSyntheticDefaultCheck.errors.txt ++++ new.moduleAugmentationDuringSyntheticDefaultCheck.errors.txt +@@= skipped -0, +0 lines =@@ +- ++idx.test.ts(1,22): error TS6231: Could not resolve the path './idx' with the extensions: '.ts', '.tsx', '.d.ts', '.cts', '.d.cts', '.mts', '.d.mts'. ++ ++ ++==== idx.test.ts (1 errors) ==== ++ /// ++ ~~~~~ ++!!! error TS6231: Could not resolve the path './idx' with the extensions: '.ts', '.tsx', '.d.ts', '.cts', '.d.cts', '.mts', '.d.mts'. ++ ++ import moment = require("moment-timezone"); ++ ++==== node_modules/moment/index.d.ts (0 errors) ==== ++ declare function moment(): moment.Moment; ++ declare namespace moment { ++ interface Moment extends Object { ++ valueOf(): number; ++ } ++ } ++ export = moment; ++==== node_modules/moment-timezone/index.d.ts (0 errors) ==== ++ import * as moment from 'moment'; ++ export = moment; ++ declare module "moment" { ++ interface Moment { ++ tz(): string; ++ } ++ } ++==== idx.ts (0 errors) ==== ++ import * as _moment from "moment"; ++ declare module "moment" { ++ interface Moment { ++ strftime(pattern: string): string; ++ } ++ } ++ declare module "moment-timezone" { ++ interface Moment { ++ strftime(pattern: string): string; ++ } ++ } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/selfReferencingFile.errors.txt b/testdata/baselines/reference/submodule/compiler/selfReferencingFile.errors.txt new file mode 100644 index 0000000000..929a58dbfa --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/selfReferencingFile.errors.txt @@ -0,0 +1,11 @@ +selfReferencingFile.ts(1,21): error TS1006: A file cannot have a reference to itself. + + +==== selfReferencingFile.ts (1 errors) ==== + /// + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1006: A file cannot have a reference to itself. + + class selfReferencingFile { + + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/selfReferencingFile.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/selfReferencingFile.errors.txt.diff deleted file mode 100644 index ee02fbbd00..0000000000 --- a/testdata/baselines/reference/submodule/compiler/selfReferencingFile.errors.txt.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- old.selfReferencingFile.errors.txt -+++ new.selfReferencingFile.errors.txt -@@= skipped -0, +0 lines =@@ --selfReferencingFile.ts(1,21): error TS1006: A file cannot have a reference to itself. -- -- --==== selfReferencingFile.ts (1 errors) ==== -- /// -- ~~~~~~~~~~~~~~~~~~~~~~ --!!! error TS1006: A file cannot have a reference to itself. -- -- class selfReferencingFile { -- -- } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/selfReferencingFile2.errors.txt b/testdata/baselines/reference/submodule/compiler/selfReferencingFile2.errors.txt new file mode 100644 index 0000000000..3ae4967fcd --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/selfReferencingFile2.errors.txt @@ -0,0 +1,11 @@ +selfReferencingFile2.ts(1,21): error TS6053: File '../selfReferencingFile2.ts' not found. + + +==== selfReferencingFile2.ts (1 errors) ==== + /// + ~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS6053: File '../selfReferencingFile2.ts' not found. + + class selfReferencingFile2 { + + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/selfReferencingFile2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/selfReferencingFile2.errors.txt.diff deleted file mode 100644 index 4492eec599..0000000000 --- a/testdata/baselines/reference/submodule/compiler/selfReferencingFile2.errors.txt.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- old.selfReferencingFile2.errors.txt -+++ new.selfReferencingFile2.errors.txt -@@= skipped -0, +0 lines =@@ --selfReferencingFile2.ts(1,21): error TS6053: File '../selfReferencingFile2.ts' not found. -- -- --==== selfReferencingFile2.ts (1 errors) ==== -- /// -- ~~~~~~~~~~~~~~~~~~~~~~~~~~ --!!! error TS6053: File '../selfReferencingFile2.ts' not found. -- -- class selfReferencingFile2 { -- -- } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/selfReferencingFile3.errors.txt b/testdata/baselines/reference/submodule/compiler/selfReferencingFile3.errors.txt new file mode 100644 index 0000000000..aa57fd314e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/selfReferencingFile3.errors.txt @@ -0,0 +1,11 @@ +selfReferencingFile3.ts(1,21): error TS1006: A file cannot have a reference to itself. + + +==== selfReferencingFile3.ts (1 errors) ==== + /// + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1006: A file cannot have a reference to itself. + + class selfReferencingFile3 { + + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/selfReferencingFile3.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/selfReferencingFile3.errors.txt.diff deleted file mode 100644 index 3a2232e9e5..0000000000 --- a/testdata/baselines/reference/submodule/compiler/selfReferencingFile3.errors.txt.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- old.selfReferencingFile3.errors.txt -+++ new.selfReferencingFile3.errors.txt -@@= skipped -0, +0 lines =@@ --selfReferencingFile3.ts(1,21): error TS1006: A file cannot have a reference to itself. -- -- --==== selfReferencingFile3.ts (1 errors) ==== -- /// -- ~~~~~~~~~~~~~~~~~~~~~~~~~ --!!! error TS1006: A file cannot have a reference to itself. -- -- class selfReferencingFile3 { -- -- } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource1.errors.txt b/testdata/baselines/reference/submodule/conformance/parserRealSource1.errors.txt new file mode 100644 index 0000000000..e7d69ba104 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource1.errors.txt @@ -0,0 +1,160 @@ +parserRealSource1.ts(4,21): error TS6053: File 'typescript.ts' not found. + + +==== parserRealSource1.ts (1 errors) ==== + // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. + // See LICENSE.txt in the project root for complete license information. + + /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. + + module TypeScript { + export module CompilerDiagnostics { + export var debug = false; + export interface IDiagnosticWriter { + Alert(output: string): void; + } + + export var diagnosticWriter: IDiagnosticWriter = null; + + export var analysisPass: number = 0; + + export function Alert(output: string) { + if (diagnosticWriter) { + diagnosticWriter.Alert(output); + } + } + + export function debugPrint(s: string) { + if (debug) { + Alert(s); + } + } + + export function assert(condition: boolean, s: string) { + if (debug) { + if (!condition) { + Alert(s); + } + } + } + + } + + export interface ILogger { + information(): boolean; + debug(): boolean; + warning(): boolean; + error(): boolean; + fatal(): boolean; + log(s: string): void; + } + + export class NullLogger implements ILogger { + public information(): boolean { return false; } + public debug(): boolean { return false; } + public warning(): boolean { return false; } + public error(): boolean { return false; } + public fatal(): boolean { return false; } + public log(s: string): void { + } + } + + export class LoggerAdapter implements ILogger { + private _information: boolean; + private _debug: boolean; + private _warning: boolean; + private _error: boolean; + private _fatal: boolean; + + constructor (public logger: ILogger) { + this._information = this.logger.information(); + this._debug = this.logger.debug(); + this._warning = this.logger.warning(); + this._error = this.logger.error(); + this._fatal = this.logger.fatal(); + } + + + public information(): boolean { return this._information; } + public debug(): boolean { return this._debug; } + public warning(): boolean { return this._warning; } + public error(): boolean { return this._error; } + public fatal(): boolean { return this._fatal; } + public log(s: string): void { + this.logger.log(s); + } + } + + export class BufferedLogger implements ILogger { + public logContents = []; + + public information(): boolean { return false; } + public debug(): boolean { return false; } + public warning(): boolean { return false; } + public error(): boolean { return false; } + public fatal(): boolean { return false; } + public log(s: string): void { + this.logContents.push(s); + } + } + + export function timeFunction(logger: ILogger, funcDescription: string, func: () =>any): any { + var start = +new Date(); + var result = func(); + var end = +new Date(); + logger.log(funcDescription + " completed in " + (end - start) + " msec"); + return result; + } + + export function stringToLiteral(value: string, length: number): string { + var result = ""; + + var addChar = (index: number) => { + var ch = value.charCodeAt(index); + switch (ch) { + case 0x09: // tab + result += "\\t"; + break; + case 0x0a: // line feed + result += "\\n"; + break; + case 0x0b: // vertical tab + result += "\\v"; + break; + case 0x0c: // form feed + result += "\\f"; + break; + case 0x0d: // carriage return + result += "\\r"; + break; + case 0x22: // double quote + result += "\\\""; + break; + case 0x27: // single quote + result += "\\\'"; + break; + case 0x5c: // Backslash + result += "\\"; + break; + default: + result += value.charAt(index); + } + } + + var tooLong = (value.length > length); + if (tooLong) { + var mid = length >> 1; + for (var i = 0; i < mid; i++) addChar(i); + result += "(...)"; + for (var i = value.length - mid; i < value.length; i++) addChar(i); + } + else { + length = value.length; + for (var i = 0; i < length; i++) addChar(i); + } + return result; + } + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource1.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource1.errors.txt.diff deleted file mode 100644 index e4a0e97966..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource1.errors.txt.diff +++ /dev/null @@ -1,164 +0,0 @@ ---- old.parserRealSource1.errors.txt -+++ new.parserRealSource1.errors.txt -@@= skipped -0, +0 lines =@@ --parserRealSource1.ts(4,21): error TS6053: File 'typescript.ts' not found. -- -- --==== parserRealSource1.ts (1 errors) ==== -- // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. -- // See LICENSE.txt in the project root for complete license information. -- -- /// -- ~~~~~~~~~~~~~ --!!! error TS6053: File 'typescript.ts' not found. -- -- module TypeScript { -- export module CompilerDiagnostics { -- export var debug = false; -- export interface IDiagnosticWriter { -- Alert(output: string): void; -- } -- -- export var diagnosticWriter: IDiagnosticWriter = null; -- -- export var analysisPass: number = 0; -- -- export function Alert(output: string) { -- if (diagnosticWriter) { -- diagnosticWriter.Alert(output); -- } -- } -- -- export function debugPrint(s: string) { -- if (debug) { -- Alert(s); -- } -- } -- -- export function assert(condition: boolean, s: string) { -- if (debug) { -- if (!condition) { -- Alert(s); -- } -- } -- } -- -- } -- -- export interface ILogger { -- information(): boolean; -- debug(): boolean; -- warning(): boolean; -- error(): boolean; -- fatal(): boolean; -- log(s: string): void; -- } -- -- export class NullLogger implements ILogger { -- public information(): boolean { return false; } -- public debug(): boolean { return false; } -- public warning(): boolean { return false; } -- public error(): boolean { return false; } -- public fatal(): boolean { return false; } -- public log(s: string): void { -- } -- } -- -- export class LoggerAdapter implements ILogger { -- private _information: boolean; -- private _debug: boolean; -- private _warning: boolean; -- private _error: boolean; -- private _fatal: boolean; -- -- constructor (public logger: ILogger) { -- this._information = this.logger.information(); -- this._debug = this.logger.debug(); -- this._warning = this.logger.warning(); -- this._error = this.logger.error(); -- this._fatal = this.logger.fatal(); -- } -- -- -- public information(): boolean { return this._information; } -- public debug(): boolean { return this._debug; } -- public warning(): boolean { return this._warning; } -- public error(): boolean { return this._error; } -- public fatal(): boolean { return this._fatal; } -- public log(s: string): void { -- this.logger.log(s); -- } -- } -- -- export class BufferedLogger implements ILogger { -- public logContents = []; -- -- public information(): boolean { return false; } -- public debug(): boolean { return false; } -- public warning(): boolean { return false; } -- public error(): boolean { return false; } -- public fatal(): boolean { return false; } -- public log(s: string): void { -- this.logContents.push(s); -- } -- } -- -- export function timeFunction(logger: ILogger, funcDescription: string, func: () =>any): any { -- var start = +new Date(); -- var result = func(); -- var end = +new Date(); -- logger.log(funcDescription + " completed in " + (end - start) + " msec"); -- return result; -- } -- -- export function stringToLiteral(value: string, length: number): string { -- var result = ""; -- -- var addChar = (index: number) => { -- var ch = value.charCodeAt(index); -- switch (ch) { -- case 0x09: // tab -- result += "\\t"; -- break; -- case 0x0a: // line feed -- result += "\\n"; -- break; -- case 0x0b: // vertical tab -- result += "\\v"; -- break; -- case 0x0c: // form feed -- result += "\\f"; -- break; -- case 0x0d: // carriage return -- result += "\\r"; -- break; -- case 0x22: // double quote -- result += "\\\""; -- break; -- case 0x27: // single quote -- result += "\\\'"; -- break; -- case 0x5c: // Backslash -- result += "\\"; -- break; -- default: -- result += value.charAt(index); -- } -- } -- -- var tooLong = (value.length > length); -- if (tooLong) { -- var mid = length >> 1; -- for (var i = 0; i < mid; i++) addChar(i); -- result += "(...)"; -- for (var i = value.length - mid; i < value.length; i++) addChar(i); -- } -- else { -- length = value.length; -- for (var i = 0; i < length; i++) addChar(i); -- } -- return result; -- } -- } -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource10.errors.txt b/testdata/baselines/reference/submodule/conformance/parserRealSource10.errors.txt index d910c1c159..e0e0ea045a 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource10.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource10.errors.txt @@ -1,3 +1,4 @@ +parserRealSource10.ts(4,21): error TS6053: File 'typescript.ts' not found. parserRealSource10.ts(127,33): error TS2449: Class 'TokenInfo' used before its declaration. parserRealSource10.ts(127,43): error TS1011: An element access expression should take an argument. parserRealSource10.ts(128,36): error TS2693: 'string' only refers to a type, but is being used as a value here. @@ -342,11 +343,13 @@ parserRealSource10.ts(356,53): error TS2304: Cannot find name 'NodeType'. parserRealSource10.ts(449,41): error TS1011: An element access expression should take an argument. -==== parserRealSource10.ts (342 errors) ==== +==== parserRealSource10.ts (343 errors) ==== // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. module TypeScript { export enum TokenID { diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource10.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource10.errors.txt.diff deleted file mode 100644 index 302ee058f5..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource10.errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.parserRealSource10.errors.txt -+++ new.parserRealSource10.errors.txt -@@= skipped -0, +0 lines =@@ --parserRealSource10.ts(4,21): error TS6053: File 'typescript.ts' not found. - parserRealSource10.ts(127,33): error TS2449: Class 'TokenInfo' used before its declaration. - parserRealSource10.ts(127,43): error TS1011: An element access expression should take an argument. - parserRealSource10.ts(128,36): error TS2693: 'string' only refers to a type, but is being used as a value here. -@@= skipped -342, +341 lines =@@ - parserRealSource10.ts(449,41): error TS1011: An element access expression should take an argument. - - --==== parserRealSource10.ts (343 errors) ==== -+==== parserRealSource10.ts (342 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// -- ~~~~~~~~~~~~~ --!!! error TS6053: File 'typescript.ts' not found. - - module TypeScript { - export enum TokenID { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource11.errors.txt b/testdata/baselines/reference/submodule/conformance/parserRealSource11.errors.txt index 301c863fe3..4584962cc2 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource11.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource11.errors.txt @@ -1,3 +1,4 @@ +parserRealSource11.ts(4,21): error TS6053: File 'typescript.ts' not found. parserRealSource11.ts(13,22): error TS2304: Cannot find name 'Type'. parserRealSource11.ts(14,24): error TS2304: Cannot find name 'ASTFlags'. parserRealSource11.ts(17,38): error TS2304: Cannot find name 'CompilerDiagnostics'. @@ -510,11 +511,13 @@ parserRealSource11.ts(2356,30): error TS2304: Cannot find name 'Emitter'. parserRealSource11.ts(2356,48): error TS2304: Cannot find name 'TokenID'. -==== parserRealSource11.ts (510 errors) ==== +==== parserRealSource11.ts (511 errors) ==== // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. module TypeScript { export class ASTSpan { diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource11.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource11.errors.txt.diff index 81f82295d6..73ab595bfe 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource11.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource11.errors.txt.diff @@ -1,11 +1,6 @@ --- old.parserRealSource11.errors.txt +++ new.parserRealSource11.errors.txt -@@= skipped -0, +0 lines =@@ --parserRealSource11.ts(4,21): error TS6053: File 'typescript.ts' not found. - parserRealSource11.ts(13,22): error TS2304: Cannot find name 'Type'. - parserRealSource11.ts(14,24): error TS2304: Cannot find name 'ASTFlags'. - parserRealSource11.ts(17,38): error TS2304: Cannot find name 'CompilerDiagnostics'. -@@= skipped -44, +43 lines =@@ +@@= skipped -44, +44 lines =@@ parserRealSource11.ts(219,33): error TS2304: Cannot find name 'NodeType'. parserRealSource11.ts(231,30): error TS2304: Cannot find name 'Emitter'. parserRealSource11.ts(231,48): error TS2304: Cannot find name 'TokenID'. @@ -278,22 +273,7 @@ parserRealSource11.ts(2312,42): error TS2304: Cannot find name 'ControlFlowContext'. parserRealSource11.ts(2320,36): error TS2304: Cannot find name 'TypeFlow'. parserRealSource11.ts(2331,19): error TS2304: Cannot find name 'NodeType'. -@@= skipped -9, +9 lines =@@ - parserRealSource11.ts(2356,48): error TS2304: Cannot find name 'TokenID'. - - --==== parserRealSource11.ts (511 errors) ==== -+==== parserRealSource11.ts (510 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// -- ~~~~~~~~~~~~~ --!!! error TS6053: File 'typescript.ts' not found. - - module TypeScript { - export class ASTSpan { -@@= skipped -329, +327 lines =@@ +@@= skipped -338, +338 lines =@@ emitter.recordSourceMappingStart(this); emitter.emitJavascriptList(this, null, TokenID.Semicolon, startLine, false, false); ~~~~~~~ diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource12.errors.txt b/testdata/baselines/reference/submodule/conformance/parserRealSource12.errors.txt index 469eb6ebc9..65f0af9317 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource12.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource12.errors.txt @@ -1,3 +1,4 @@ +parserRealSource12.ts(4,21): error TS6053: File 'typescript.ts' not found. parserRealSource12.ts(8,19): error TS2304: Cannot find name 'AST'. parserRealSource12.ts(8,32): error TS2304: Cannot find name 'AST'. parserRealSource12.ts(8,38): error TS2304: Cannot find name 'AST'. @@ -208,11 +209,13 @@ parserRealSource12.ts(523,88): error TS2304: Cannot find name 'AST'. parserRealSource12.ts(524,30): error TS2304: Cannot find name 'ASTList'. -==== parserRealSource12.ts (208 errors) ==== +==== parserRealSource12.ts (209 errors) ==== // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. module TypeScript { export interface IAstWalker { diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource12.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource12.errors.txt.diff index 5a68c67dd6..9d0f9c4570 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource12.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource12.errors.txt.diff @@ -1,11 +1,6 @@ --- old.parserRealSource12.errors.txt +++ new.parserRealSource12.errors.txt -@@= skipped -0, +0 lines =@@ --parserRealSource12.ts(4,21): error TS6053: File 'typescript.ts' not found. - parserRealSource12.ts(8,19): error TS2304: Cannot find name 'AST'. - parserRealSource12.ts(8,32): error TS2304: Cannot find name 'AST'. - parserRealSource12.ts(8,38): error TS2304: Cannot find name 'AST'. -@@= skipped -154, +153 lines =@@ +@@= skipped -154, +154 lines =@@ parserRealSource12.ts(371,84): error TS2304: Cannot find name 'AST'. parserRealSource12.ts(378,62): error TS2304: Cannot find name 'DoWhileStatement'. parserRealSource12.ts(378,88): error TS2304: Cannot find name 'AST'. @@ -41,22 +36,7 @@ parserRealSource12.ts(465,81): error TS2304: Cannot find name 'AST'. parserRealSource12.ts(469,39): error TS2304: Cannot find name 'ASTList'. parserRealSource12.ts(473,42): error TS2304: Cannot find name 'ASTList'. -@@= skipped -40, +40 lines =@@ - parserRealSource12.ts(524,30): error TS2304: Cannot find name 'ASTList'. - - --==== parserRealSource12.ts (209 errors) ==== -+==== parserRealSource12.ts (208 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// -- ~~~~~~~~~~~~~ --!!! error TS6053: File 'typescript.ts' not found. - - module TypeScript { - export interface IAstWalker { -@@= skipped -701, +699 lines =@@ +@@= skipped -741, +741 lines =@@ export function walkBlockChildren(preAst: Block, parent: AST, walker: IAstWalker): void { ~~~~~ diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource13.errors.txt b/testdata/baselines/reference/submodule/conformance/parserRealSource13.errors.txt index edd2adfa16..45a111a3a4 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource13.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource13.errors.txt @@ -1,3 +1,4 @@ +parserRealSource13.ts(4,21): error TS6053: File 'typescript.ts' not found. parserRealSource13.ts(8,35): error TS2304: Cannot find name 'AST'. parserRealSource13.ts(9,39): error TS2304: Cannot find name 'AST'. parserRealSource13.ts(10,34): error TS2304: Cannot find name 'AST'. @@ -115,11 +116,13 @@ parserRealSource13.ts(132,51): error TS2304: Cannot find name 'AST'. parserRealSource13.ts(135,36): error TS2552: Cannot find name 'NodeType'. Did you mean 'nodeType'? -==== parserRealSource13.ts (115 errors) ==== +==== parserRealSource13.ts (116 errors) ==== // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. module TypeScript.AstWalkerWithDetailCallback { export interface AstWalkerDetailCallback { diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource13.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource13.errors.txt.diff index 589c40b732..d59cc36493 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource13.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource13.errors.txt.diff @@ -1,11 +1,6 @@ --- old.parserRealSource13.errors.txt +++ new.parserRealSource13.errors.txt -@@= skipped -0, +0 lines =@@ --parserRealSource13.ts(4,21): error TS6053: File 'typescript.ts' not found. - parserRealSource13.ts(8,35): error TS2304: Cannot find name 'AST'. - parserRealSource13.ts(9,39): error TS2304: Cannot find name 'AST'. - parserRealSource13.ts(10,34): error TS2304: Cannot find name 'AST'. -@@= skipped -81, +80 lines =@@ +@@= skipped -81, +81 lines =@@ parserRealSource13.ts(88,32): error TS2304: Cannot find name 'AST'. parserRealSource13.ts(89,35): error TS2304: Cannot find name 'AST'. parserRealSource13.ts(90,37): error TS2304: Cannot find name 'AST'. @@ -19,23 +14,11 @@ parserRealSource13.ts(128,33): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. parserRealSource13.ts(132,51): error TS2304: Cannot find name 'AST'. -parserRealSource13.ts(135,36): error TS2304: Cannot find name 'NodeType'. -- -- --==== parserRealSource13.ts (116 errors) ==== +parserRealSource13.ts(135,36): error TS2552: Cannot find name 'NodeType'. Did you mean 'nodeType'? -+ -+ -+==== parserRealSource13.ts (115 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// -- ~~~~~~~~~~~~~ --!!! error TS6053: File 'typescript.ts' not found. - - module TypeScript.AstWalkerWithDetailCallback { - export interface AstWalkerDetailCallback { -@@= skipped -264, +262 lines =@@ + + + ==== parserRealSource13.ts (116 errors) ==== +@@= skipped -264, +264 lines =@@ !!! error TS2304: Cannot find name 'AST'. BlockCallback? (pre, block: Block): boolean; ~~~~~ diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource14.errors.txt b/testdata/baselines/reference/submodule/conformance/parserRealSource14.errors.txt index cee28fce0c..417b0c7c6b 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource14.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource14.errors.txt @@ -1,3 +1,4 @@ +parserRealSource14.ts(4,21): error TS6053: File 'typescript.ts' not found. parserRealSource14.ts(24,33): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. parserRealSource14.ts(38,34): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. parserRealSource14.ts(48,37): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. @@ -159,11 +160,13 @@ parserRealSource14.ts(565,94): error TS2694: Namespace 'TypeScript' has no expor parserRealSource14.ts(572,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. -==== parserRealSource14.ts (159 errors) ==== +==== parserRealSource14.ts (160 errors) ==== // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. module TypeScript { export function lastOf(items: any[]): any { diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource14.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource14.errors.txt.diff deleted file mode 100644 index 112eb0b83a..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource14.errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.parserRealSource14.errors.txt -+++ new.parserRealSource14.errors.txt -@@= skipped -0, +0 lines =@@ --parserRealSource14.ts(4,21): error TS6053: File 'typescript.ts' not found. - parserRealSource14.ts(24,33): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - parserRealSource14.ts(38,34): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - parserRealSource14.ts(48,37): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -@@= skipped -159, +158 lines =@@ - parserRealSource14.ts(572,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. - - --==== parserRealSource14.ts (160 errors) ==== -+==== parserRealSource14.ts (159 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// -- ~~~~~~~~~~~~~ --!!! error TS6053: File 'typescript.ts' not found. - - module TypeScript { - export function lastOf(items: any[]): any { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource2.errors.txt b/testdata/baselines/reference/submodule/conformance/parserRealSource2.errors.txt new file mode 100644 index 0000000000..fe21785dbd --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource2.errors.txt @@ -0,0 +1,277 @@ +parserRealSource2.ts(4,21): error TS6053: File 'typescript.ts' not found. + + +==== parserRealSource2.ts (1 errors) ==== + // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. + // See LICENSE.txt in the project root for complete license information. + + /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. + + module TypeScript { + + export function hasFlag(val: number, flag: number) { + return (val & flag) != 0; + } + + export enum ErrorRecoverySet { + None = 0, + Comma = 1, // Comma + SColon = 1 << 1, // SColon + Asg = 1 << 2, // Asg + BinOp = 1 << 3, // Lsh, Rsh, Rs2, Le, Ge, INSTANCEOF, EQ, NE, Eqv, NEqv, LogAnd, LogOr, AsgMul, AsgDiv + // AsgMod, AsgAdd, AsgSub, AsgLsh, AsgRsh, AsgRs2, AsgAnd, AsgXor, AsgOr, QMark, Mult, Div, + // Pct, GT, LT, And, Xor, Or + RBrack = 1 << 4, // RBrack + RCurly = 1 << 5, // RCurly + RParen = 1 << 6, // RParen + Dot = 1 << 7, // Dot + Colon = 1 << 8, // Colon + PrimType = 1 << 9, // number, string, boolean + AddOp = 1 << 10, // Add, Sub + LCurly = 1 << 11, // LCurly + PreOp = 1 << 12, // Tilde, Bang, Inc, Dec + RegExp = 1 << 13, // RegExp + LParen = 1 << 14, // LParen + LBrack = 1 << 15, // LBrack + Scope = 1 << 16, // Scope + In = 1 << 17, // IN + SCase = 1 << 18, // CASE, DEFAULT + Else = 1 << 19, // ELSE + Catch = 1 << 20, // CATCH, FINALLY + Var = 1 << 21, // + Stmt = 1 << 22, // BREAK, RETURN, THROW, DEBUGGER, FOR, SWITCH, DO, IF, TRY, WITH + While = 1 << 23, // WHILE + ID = 1 << 24, // ID + Prefix = 1 << 25, // VOID, DELETE, TYPEOF, AWAIT + Literal = 1 << 26, // IntCon, FltCon, StrCon + RLit = 1 << 27, // THIS, TRUE, FALSE, NULL + Func = 1 << 28, // FUNCTION + EOF = 1 << 29, // EOF + + // REVIEW: Name this something clearer. + TypeScriptS = 1 << 30, // PROPERTY, PRIVATE, STATIC, INTERFACE, CLASS, MODULE, EXPORT, IMPORT + ExprStart = SColon | AddOp | LCurly | PreOp | RegExp | LParen | LBrack | ID | Prefix | RLit | Func | Literal, + StmtStart = ExprStart | SColon | Var | Stmt | While | TypeScriptS, + Postfix = Dot | LParen | LBrack, + } + + export enum AllowedElements { + None = 0, + ModuleDeclarations = 1 << 2, + ClassDeclarations = 1 << 3, + InterfaceDeclarations = 1 << 4, + AmbientDeclarations = 1 << 10, + Properties = 1 << 11, + + Global = ModuleDeclarations | ClassDeclarations | InterfaceDeclarations | AmbientDeclarations, + QuickParse = Global | Properties, + } + + export enum Modifiers { + None = 0, + Private = 1, + Public = 1 << 1, + Readonly = 1 << 2, + Ambient = 1 << 3, + Exported = 1 << 4, + Getter = 1 << 5, + Setter = 1 << 6, + Static = 1 << 7, + } + + export enum ASTFlags { + None = 0, + ExplicitSemicolon = 1, // statment terminated by an explicit semicolon + AutomaticSemicolon = 1 << 1, // statment terminated by an automatic semicolon + Writeable = 1 << 2, // node is lhs that can be modified + Error = 1 << 3, // node has an error + DotLHSPartial = 1 << 4, // node is the lhs of an incomplete dot expr at cursor + DotLHS = 1 << 5, // node is the lhs of a dot expr + IsStatement = 1 << 6, // node is a statement + StrictMode = 1 << 7, // node is in the strict mode environment + PossibleOptionalParameter = 1 << 8, + ClassBaseConstructorCall = 1 << 9, + OptionalName = 1 << 10, + // REVIEW: This flag is to mark lambda nodes to note that the LParen of an expression has already been matched in the lambda header. + // The flag is used to communicate this piece of information to the calling parseTerm, which intern will remove it. + // Once we have a better way to associate information with nodes, this flag should not be used. + SkipNextRParen = 1 << 11, + } + + export enum DeclFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + Public = 1 << 2, + Ambient = 1 << 3, + Static = 1 << 4, + LocalStatic = 1 << 5, + GetAccessor = 1 << 6, + SetAccessor = 1 << 7, + } + + export enum ModuleFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + Public = 1 << 2, + Ambient = 1 << 3, + Static = 1 << 4, + LocalStatic = 1 << 5, + GetAccessor = 1 << 6, + SetAccessor = 1 << 7, + IsEnum = 1 << 8, + ShouldEmitModuleDecl = 1 << 9, + IsWholeFile = 1 << 10, + IsDynamic = 1 << 11, + MustCaptureThis = 1 << 12, + } + + export enum SymbolFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + Public = 1 << 2, + Ambient = 1 << 3, + Static = 1 << 4, + LocalStatic = 1 << 5, + GetAccessor = 1 << 6, + SetAccessor = 1 << 7, + Property = 1 << 8, + Readonly = 1 << 9, + ModuleMember = 1 << 10, + InterfaceMember = 1 << 11, + ClassMember = 1 << 12, + BuiltIn = 1 << 13, + TypeSetDuringScopeAssignment = 1 << 14, + Constant = 1 << 15, + Optional = 1 << 16, + RecursivelyReferenced = 1 << 17, + Bound = 1 << 18, + CompilerGenerated = 1 << 19, + } + + export enum VarFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + Public = 1 << 2, + Ambient = 1 << 3, + Static = 1 << 4, + LocalStatic = 1 << 5, + GetAccessor = 1 << 6, + SetAccessor = 1 << 7, + AutoInit = 1 << 8, + Property = 1 << 9, + Readonly = 1 << 10, + Class = 1 << 11, + ClassProperty = 1 << 12, + ClassBodyProperty = 1 << 13, + ClassConstructorProperty = 1 << 14, + ClassSuperMustBeFirstCallInConstructor = 1 << 15, + Constant = 1 << 16, + MustCaptureThis = 1 << 17, + } + + export enum FncFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + Public = 1 << 2, + Ambient = 1 << 3, + Static = 1 << 4, + LocalStatic = 1 << 5, + GetAccessor = 1 << 6, + SetAccessor = 1 << 7, + Definition = 1 << 8, + Signature = 1 << 9, + Method = 1 << 10, + HasReturnExpression = 1 << 11, + CallMember = 1 << 12, + ConstructMember = 1 << 13, + HasSelfReference = 1 << 14, + IsFatArrowFunction = 1 << 15, + IndexerMember = 1 << 16, + IsFunctionExpression = 1 << 17, + ClassMethod = 1 << 18, + ClassPropertyMethodExported = 1 << 19, + } + + export enum SignatureFlags { + None = 0, + IsIndexer = 1, + IsStringIndexer = 1 << 1, + IsNumberIndexer = 1 << 2, + } + + export function ToDeclFlags(fncFlags: FncFlags) : DeclFlags; + export function ToDeclFlags(varFlags: VarFlags) : DeclFlags; + export function ToDeclFlags(symFlags: SymbolFlags): DeclFlags; + export function ToDeclFlags(moduleFlags: ModuleFlags): DeclFlags; + export function ToDeclFlags(fncOrVarOrSymbolOrModuleFlags: any) { + return fncOrVarOrSymbolOrModuleFlags; + } + + export enum TypeFlags { + None = 0, + HasImplementation = 1, + HasSelfReference = 1 << 1, + MergeResult = 1 << 2, + IsEnum = 1 << 3, + BuildingName = 1 << 4, + HasBaseType = 1 << 5, + HasBaseTypeOfObject = 1 << 6, + IsClass = 1 << 7, + } + + export enum TypeRelationshipFlags { + SuccessfulComparison = 0, + SourceIsNullTargetIsVoidOrUndefined = 1, + RequiredPropertyIsMissing = 1 << 1, + IncompatibleSignatures = 1 << 2, + SourceSignatureHasTooManyParameters = 3, + IncompatibleReturnTypes = 1 << 4, + IncompatiblePropertyTypes = 1 << 5, + IncompatibleParameterTypes = 1 << 6, + } + + export enum CodeGenTarget { + ES3 = 0, + ES5 = 1, + } + + export enum ModuleGenTarget { + Synchronous = 0, + Asynchronous = 1, + Local = 1 << 1, + } + + // Compiler defaults to generating ES5-compliant code for + // - getters and setters + export var codeGenTarget: CodeGenTarget = CodeGenTarget.ES3; + + export var moduleGenTarget: ModuleGenTarget = ModuleGenTarget.Synchronous; + + export var optimizeModuleCodeGen = true; + + export function flagsToString(e, flags: number): string { + var builder = ""; + for (var i = 1; i < (1 << 31) ; i = i << 1) { + if ((flags & i) != 0) { + for (var k in e) { + if (e[k] == i) { + if (builder.length > 0) { + builder += "|"; + } + builder += k; + break; + } + } + } + } + return builder; + } + + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource2.errors.txt.diff deleted file mode 100644 index 1474c69126..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource2.errors.txt.diff +++ /dev/null @@ -1,281 +0,0 @@ ---- old.parserRealSource2.errors.txt -+++ new.parserRealSource2.errors.txt -@@= skipped -0, +0 lines =@@ --parserRealSource2.ts(4,21): error TS6053: File 'typescript.ts' not found. -- -- --==== parserRealSource2.ts (1 errors) ==== -- // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. -- // See LICENSE.txt in the project root for complete license information. -- -- /// -- ~~~~~~~~~~~~~ --!!! error TS6053: File 'typescript.ts' not found. -- -- module TypeScript { -- -- export function hasFlag(val: number, flag: number) { -- return (val & flag) != 0; -- } -- -- export enum ErrorRecoverySet { -- None = 0, -- Comma = 1, // Comma -- SColon = 1 << 1, // SColon -- Asg = 1 << 2, // Asg -- BinOp = 1 << 3, // Lsh, Rsh, Rs2, Le, Ge, INSTANCEOF, EQ, NE, Eqv, NEqv, LogAnd, LogOr, AsgMul, AsgDiv -- // AsgMod, AsgAdd, AsgSub, AsgLsh, AsgRsh, AsgRs2, AsgAnd, AsgXor, AsgOr, QMark, Mult, Div, -- // Pct, GT, LT, And, Xor, Or -- RBrack = 1 << 4, // RBrack -- RCurly = 1 << 5, // RCurly -- RParen = 1 << 6, // RParen -- Dot = 1 << 7, // Dot -- Colon = 1 << 8, // Colon -- PrimType = 1 << 9, // number, string, boolean -- AddOp = 1 << 10, // Add, Sub -- LCurly = 1 << 11, // LCurly -- PreOp = 1 << 12, // Tilde, Bang, Inc, Dec -- RegExp = 1 << 13, // RegExp -- LParen = 1 << 14, // LParen -- LBrack = 1 << 15, // LBrack -- Scope = 1 << 16, // Scope -- In = 1 << 17, // IN -- SCase = 1 << 18, // CASE, DEFAULT -- Else = 1 << 19, // ELSE -- Catch = 1 << 20, // CATCH, FINALLY -- Var = 1 << 21, // -- Stmt = 1 << 22, // BREAK, RETURN, THROW, DEBUGGER, FOR, SWITCH, DO, IF, TRY, WITH -- While = 1 << 23, // WHILE -- ID = 1 << 24, // ID -- Prefix = 1 << 25, // VOID, DELETE, TYPEOF, AWAIT -- Literal = 1 << 26, // IntCon, FltCon, StrCon -- RLit = 1 << 27, // THIS, TRUE, FALSE, NULL -- Func = 1 << 28, // FUNCTION -- EOF = 1 << 29, // EOF -- -- // REVIEW: Name this something clearer. -- TypeScriptS = 1 << 30, // PROPERTY, PRIVATE, STATIC, INTERFACE, CLASS, MODULE, EXPORT, IMPORT -- ExprStart = SColon | AddOp | LCurly | PreOp | RegExp | LParen | LBrack | ID | Prefix | RLit | Func | Literal, -- StmtStart = ExprStart | SColon | Var | Stmt | While | TypeScriptS, -- Postfix = Dot | LParen | LBrack, -- } -- -- export enum AllowedElements { -- None = 0, -- ModuleDeclarations = 1 << 2, -- ClassDeclarations = 1 << 3, -- InterfaceDeclarations = 1 << 4, -- AmbientDeclarations = 1 << 10, -- Properties = 1 << 11, -- -- Global = ModuleDeclarations | ClassDeclarations | InterfaceDeclarations | AmbientDeclarations, -- QuickParse = Global | Properties, -- } -- -- export enum Modifiers { -- None = 0, -- Private = 1, -- Public = 1 << 1, -- Readonly = 1 << 2, -- Ambient = 1 << 3, -- Exported = 1 << 4, -- Getter = 1 << 5, -- Setter = 1 << 6, -- Static = 1 << 7, -- } -- -- export enum ASTFlags { -- None = 0, -- ExplicitSemicolon = 1, // statment terminated by an explicit semicolon -- AutomaticSemicolon = 1 << 1, // statment terminated by an automatic semicolon -- Writeable = 1 << 2, // node is lhs that can be modified -- Error = 1 << 3, // node has an error -- DotLHSPartial = 1 << 4, // node is the lhs of an incomplete dot expr at cursor -- DotLHS = 1 << 5, // node is the lhs of a dot expr -- IsStatement = 1 << 6, // node is a statement -- StrictMode = 1 << 7, // node is in the strict mode environment -- PossibleOptionalParameter = 1 << 8, -- ClassBaseConstructorCall = 1 << 9, -- OptionalName = 1 << 10, -- // REVIEW: This flag is to mark lambda nodes to note that the LParen of an expression has already been matched in the lambda header. -- // The flag is used to communicate this piece of information to the calling parseTerm, which intern will remove it. -- // Once we have a better way to associate information with nodes, this flag should not be used. -- SkipNextRParen = 1 << 11, -- } -- -- export enum DeclFlags { -- None = 0, -- Exported = 1, -- Private = 1 << 1, -- Public = 1 << 2, -- Ambient = 1 << 3, -- Static = 1 << 4, -- LocalStatic = 1 << 5, -- GetAccessor = 1 << 6, -- SetAccessor = 1 << 7, -- } -- -- export enum ModuleFlags { -- None = 0, -- Exported = 1, -- Private = 1 << 1, -- Public = 1 << 2, -- Ambient = 1 << 3, -- Static = 1 << 4, -- LocalStatic = 1 << 5, -- GetAccessor = 1 << 6, -- SetAccessor = 1 << 7, -- IsEnum = 1 << 8, -- ShouldEmitModuleDecl = 1 << 9, -- IsWholeFile = 1 << 10, -- IsDynamic = 1 << 11, -- MustCaptureThis = 1 << 12, -- } -- -- export enum SymbolFlags { -- None = 0, -- Exported = 1, -- Private = 1 << 1, -- Public = 1 << 2, -- Ambient = 1 << 3, -- Static = 1 << 4, -- LocalStatic = 1 << 5, -- GetAccessor = 1 << 6, -- SetAccessor = 1 << 7, -- Property = 1 << 8, -- Readonly = 1 << 9, -- ModuleMember = 1 << 10, -- InterfaceMember = 1 << 11, -- ClassMember = 1 << 12, -- BuiltIn = 1 << 13, -- TypeSetDuringScopeAssignment = 1 << 14, -- Constant = 1 << 15, -- Optional = 1 << 16, -- RecursivelyReferenced = 1 << 17, -- Bound = 1 << 18, -- CompilerGenerated = 1 << 19, -- } -- -- export enum VarFlags { -- None = 0, -- Exported = 1, -- Private = 1 << 1, -- Public = 1 << 2, -- Ambient = 1 << 3, -- Static = 1 << 4, -- LocalStatic = 1 << 5, -- GetAccessor = 1 << 6, -- SetAccessor = 1 << 7, -- AutoInit = 1 << 8, -- Property = 1 << 9, -- Readonly = 1 << 10, -- Class = 1 << 11, -- ClassProperty = 1 << 12, -- ClassBodyProperty = 1 << 13, -- ClassConstructorProperty = 1 << 14, -- ClassSuperMustBeFirstCallInConstructor = 1 << 15, -- Constant = 1 << 16, -- MustCaptureThis = 1 << 17, -- } -- -- export enum FncFlags { -- None = 0, -- Exported = 1, -- Private = 1 << 1, -- Public = 1 << 2, -- Ambient = 1 << 3, -- Static = 1 << 4, -- LocalStatic = 1 << 5, -- GetAccessor = 1 << 6, -- SetAccessor = 1 << 7, -- Definition = 1 << 8, -- Signature = 1 << 9, -- Method = 1 << 10, -- HasReturnExpression = 1 << 11, -- CallMember = 1 << 12, -- ConstructMember = 1 << 13, -- HasSelfReference = 1 << 14, -- IsFatArrowFunction = 1 << 15, -- IndexerMember = 1 << 16, -- IsFunctionExpression = 1 << 17, -- ClassMethod = 1 << 18, -- ClassPropertyMethodExported = 1 << 19, -- } -- -- export enum SignatureFlags { -- None = 0, -- IsIndexer = 1, -- IsStringIndexer = 1 << 1, -- IsNumberIndexer = 1 << 2, -- } -- -- export function ToDeclFlags(fncFlags: FncFlags) : DeclFlags; -- export function ToDeclFlags(varFlags: VarFlags) : DeclFlags; -- export function ToDeclFlags(symFlags: SymbolFlags): DeclFlags; -- export function ToDeclFlags(moduleFlags: ModuleFlags): DeclFlags; -- export function ToDeclFlags(fncOrVarOrSymbolOrModuleFlags: any) { -- return fncOrVarOrSymbolOrModuleFlags; -- } -- -- export enum TypeFlags { -- None = 0, -- HasImplementation = 1, -- HasSelfReference = 1 << 1, -- MergeResult = 1 << 2, -- IsEnum = 1 << 3, -- BuildingName = 1 << 4, -- HasBaseType = 1 << 5, -- HasBaseTypeOfObject = 1 << 6, -- IsClass = 1 << 7, -- } -- -- export enum TypeRelationshipFlags { -- SuccessfulComparison = 0, -- SourceIsNullTargetIsVoidOrUndefined = 1, -- RequiredPropertyIsMissing = 1 << 1, -- IncompatibleSignatures = 1 << 2, -- SourceSignatureHasTooManyParameters = 3, -- IncompatibleReturnTypes = 1 << 4, -- IncompatiblePropertyTypes = 1 << 5, -- IncompatibleParameterTypes = 1 << 6, -- } -- -- export enum CodeGenTarget { -- ES3 = 0, -- ES5 = 1, -- } -- -- export enum ModuleGenTarget { -- Synchronous = 0, -- Asynchronous = 1, -- Local = 1 << 1, -- } -- -- // Compiler defaults to generating ES5-compliant code for -- // - getters and setters -- export var codeGenTarget: CodeGenTarget = CodeGenTarget.ES3; -- -- export var moduleGenTarget: ModuleGenTarget = ModuleGenTarget.Synchronous; -- -- export var optimizeModuleCodeGen = true; -- -- export function flagsToString(e, flags: number): string { -- var builder = ""; -- for (var i = 1; i < (1 << 31) ; i = i << 1) { -- if ((flags & i) != 0) { -- for (var k in e) { -- if (e[k] == i) { -- if (builder.length > 0) { -- builder += "|"; -- } -- builder += k; -- break; -- } -- } -- } -- } -- return builder; -- } -- -- } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource3.errors.txt b/testdata/baselines/reference/submodule/conformance/parserRealSource3.errors.txt new file mode 100644 index 0000000000..ad9c1f9ac6 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource3.errors.txt @@ -0,0 +1,125 @@ +parserRealSource3.ts(4,21): error TS6053: File 'typescript.ts' not found. + + +==== parserRealSource3.ts (1 errors) ==== + // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. + // See LICENSE.txt in the project root for complete license information. + + /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. + + module TypeScript { + // Note: Any addition to the NodeType should also be supported with addition to AstWalkerDetailCallback + export enum NodeType { + None, + Empty, + EmptyExpr, + True, + False, + This, + Super, + QString, + Regex, + Null, + ArrayLit, + ObjectLit, + Void, + Comma, + Pos, + Neg, + Delete, + Await, + In, + Dot, + From, + Is, + InstOf, + Typeof, + NumberLit, + Name, + TypeRef, + Index, + Call, + New, + Asg, + AsgAdd, + AsgSub, + AsgDiv, + AsgMul, + AsgMod, + AsgAnd, + AsgXor, + AsgOr, + AsgLsh, + AsgRsh, + AsgRs2, + ConditionalExpression, + LogOr, + LogAnd, + Or, + Xor, + And, + Eq, + Ne, + Eqv, + NEqv, + Lt, + Le, + Gt, + Ge, + Add, + Sub, + Mul, + Div, + Mod, + Lsh, + Rsh, + Rs2, + Not, + LogNot, + IncPre, + DecPre, + IncPost, + DecPost, + TypeAssertion, + FuncDecl, + Member, + VarDecl, + ArgDecl, + Return, + Break, + Continue, + Throw, + For, + ForIn, + If, + While, + DoWhile, + Block, + Case, + Switch, + Try, + TryCatch, + TryFinally, + Finally, + Catch, + List, + Script, + ClassDeclaration, + InterfaceDeclaration, + ModuleDeclaration, + ImportDeclaration, + With, + Label, + LabeledStatement, + EBStart, + GotoEB, + EndCode, + Error, + Comment, + Debugger, + GeneralNode = FuncDecl, + LastAsg = AsgRs2, + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource3.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource3.errors.txt.diff deleted file mode 100644 index abd13c93f3..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource3.errors.txt.diff +++ /dev/null @@ -1,129 +0,0 @@ ---- old.parserRealSource3.errors.txt -+++ new.parserRealSource3.errors.txt -@@= skipped -0, +0 lines =@@ --parserRealSource3.ts(4,21): error TS6053: File 'typescript.ts' not found. -- -- --==== parserRealSource3.ts (1 errors) ==== -- // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. -- // See LICENSE.txt in the project root for complete license information. -- -- /// -- ~~~~~~~~~~~~~ --!!! error TS6053: File 'typescript.ts' not found. -- -- module TypeScript { -- // Note: Any addition to the NodeType should also be supported with addition to AstWalkerDetailCallback -- export enum NodeType { -- None, -- Empty, -- EmptyExpr, -- True, -- False, -- This, -- Super, -- QString, -- Regex, -- Null, -- ArrayLit, -- ObjectLit, -- Void, -- Comma, -- Pos, -- Neg, -- Delete, -- Await, -- In, -- Dot, -- From, -- Is, -- InstOf, -- Typeof, -- NumberLit, -- Name, -- TypeRef, -- Index, -- Call, -- New, -- Asg, -- AsgAdd, -- AsgSub, -- AsgDiv, -- AsgMul, -- AsgMod, -- AsgAnd, -- AsgXor, -- AsgOr, -- AsgLsh, -- AsgRsh, -- AsgRs2, -- ConditionalExpression, -- LogOr, -- LogAnd, -- Or, -- Xor, -- And, -- Eq, -- Ne, -- Eqv, -- NEqv, -- Lt, -- Le, -- Gt, -- Ge, -- Add, -- Sub, -- Mul, -- Div, -- Mod, -- Lsh, -- Rsh, -- Rs2, -- Not, -- LogNot, -- IncPre, -- DecPre, -- IncPost, -- DecPost, -- TypeAssertion, -- FuncDecl, -- Member, -- VarDecl, -- ArgDecl, -- Return, -- Break, -- Continue, -- Throw, -- For, -- ForIn, -- If, -- While, -- DoWhile, -- Block, -- Case, -- Switch, -- Try, -- TryCatch, -- TryFinally, -- Finally, -- Catch, -- List, -- Script, -- ClassDeclaration, -- InterfaceDeclaration, -- ModuleDeclaration, -- ImportDeclaration, -- With, -- Label, -- LabeledStatement, -- EBStart, -- GotoEB, -- EndCode, -- Error, -- Comment, -- Debugger, -- GeneralNode = FuncDecl, -- LastAsg = AsgRs2, -- } -- } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource4.errors.txt b/testdata/baselines/reference/submodule/conformance/parserRealSource4.errors.txt index f3bf960e1d..d20b223402 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource4.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource4.errors.txt @@ -1,11 +1,14 @@ +parserRealSource4.ts(4,21): error TS6053: File 'typescript.ts' not found. parserRealSource4.ts(195,38): error TS1011: An element access expression should take an argument. -==== parserRealSource4.ts (1 errors) ==== +==== parserRealSource4.ts (2 errors) ==== // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. module TypeScript { diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource4.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource4.errors.txt.diff deleted file mode 100644 index a20c55edde..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource4.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.parserRealSource4.errors.txt -+++ new.parserRealSource4.errors.txt -@@= skipped -0, +0 lines =@@ --parserRealSource4.ts(4,21): error TS6053: File 'typescript.ts' not found. - parserRealSource4.ts(195,38): error TS1011: An element access expression should take an argument. - - --==== parserRealSource4.ts (2 errors) ==== -+==== parserRealSource4.ts (1 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// -- ~~~~~~~~~~~~~ --!!! error TS6053: File 'typescript.ts' not found. - - module TypeScript { - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource5.errors.txt b/testdata/baselines/reference/submodule/conformance/parserRealSource5.errors.txt index 8e13f7af9d..9166edb4e6 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource5.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource5.errors.txt @@ -1,3 +1,4 @@ +parserRealSource5.ts(4,21): error TS6053: File 'typescript.ts' not found. parserRealSource5.ts(14,66): error TS2304: Cannot find name 'Parser'. parserRealSource5.ts(27,17): error TS2304: Cannot find name 'CompilerDiagnostics'. parserRealSource5.ts(52,38): error TS2304: Cannot find name 'AST'. @@ -8,11 +9,13 @@ parserRealSource5.ts(61,52): error TS2304: Cannot find name 'AST'. parserRealSource5.ts(61,65): error TS2304: Cannot find name 'IAstWalker'. -==== parserRealSource5.ts (8 errors) ==== +==== parserRealSource5.ts (9 errors) ==== // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. module TypeScript { // TODO: refactor indent logic for use in emit diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource5.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource5.errors.txt.diff deleted file mode 100644 index 5c7ec99caf..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource5.errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.parserRealSource5.errors.txt -+++ new.parserRealSource5.errors.txt -@@= skipped -0, +0 lines =@@ --parserRealSource5.ts(4,21): error TS6053: File 'typescript.ts' not found. - parserRealSource5.ts(14,66): error TS2304: Cannot find name 'Parser'. - parserRealSource5.ts(27,17): error TS2304: Cannot find name 'CompilerDiagnostics'. - parserRealSource5.ts(52,38): error TS2304: Cannot find name 'AST'. -@@= skipped -8, +7 lines =@@ - parserRealSource5.ts(61,65): error TS2304: Cannot find name 'IAstWalker'. - - --==== parserRealSource5.ts (9 errors) ==== -+==== parserRealSource5.ts (8 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// -- ~~~~~~~~~~~~~ --!!! error TS6053: File 'typescript.ts' not found. - - module TypeScript { - // TODO: refactor indent logic for use in emit \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource6.errors.txt b/testdata/baselines/reference/submodule/conformance/parserRealSource6.errors.txt index 6d21559554..0c55b63b07 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource6.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource6.errors.txt @@ -1,3 +1,4 @@ +parserRealSource6.ts(4,21): error TS6053: File 'typescript.ts' not found. parserRealSource6.ts(8,24): error TS2304: Cannot find name 'Script'. parserRealSource6.ts(10,41): error TS2304: Cannot find name 'ScopeChain'. parserRealSource6.ts(10,69): error TS2304: Cannot find name 'TypeChecker'. @@ -59,11 +60,13 @@ parserRealSource6.ts(212,81): error TS2304: Cannot find name 'ISourceText'. parserRealSource6.ts(215,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. -==== parserRealSource6.ts (59 errors) ==== +==== parserRealSource6.ts (60 errors) ==== // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. module TypeScript { export class TypeCollectionContext { diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource6.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource6.errors.txt.diff index 56c1619149..f7b30ecddc 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource6.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource6.errors.txt.diff @@ -1,11 +1,6 @@ --- old.parserRealSource6.errors.txt +++ new.parserRealSource6.errors.txt -@@= skipped -0, +0 lines =@@ --parserRealSource6.ts(4,21): error TS6053: File 'typescript.ts' not found. - parserRealSource6.ts(8,24): error TS2304: Cannot find name 'Script'. - parserRealSource6.ts(10,41): error TS2304: Cannot find name 'ScopeChain'. - parserRealSource6.ts(10,69): error TS2304: Cannot find name 'TypeChecker'. -@@= skipped -11, +10 lines =@@ +@@= skipped -11, +11 lines =@@ parserRealSource6.ts(27,48): error TS2304: Cannot find name 'SymbolScope'. parserRealSource6.ts(28,31): error TS2304: Cannot find name 'AST'. parserRealSource6.ts(30,35): error TS2304: Cannot find name 'ModuleDeclaration'. @@ -23,22 +18,7 @@ parserRealSource6.ts(142,22): error TS2304: Cannot find name 'NodeType'. parserRealSource6.ts(143,38): error TS2304: Cannot find name 'UnaryExpression'. parserRealSource6.ts(156,22): error TS2304: Cannot find name 'NodeType'. -@@= skipped -16, +16 lines =@@ - parserRealSource6.ts(215,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. - - --==== parserRealSource6.ts (60 errors) ==== -+==== parserRealSource6.ts (59 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// -- ~~~~~~~~~~~~~ --!!! error TS6053: File 'typescript.ts' not found. - - module TypeScript { - export class TypeCollectionContext { -@@= skipped -61, +59 lines =@@ +@@= skipped -77, +77 lines =@@ !!! error TS2304: Cannot find name 'ModuleDeclaration'. public enclosingClassDecl: TypeDeclaration = null; ~~~~~~~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource7.errors.txt b/testdata/baselines/reference/submodule/conformance/parserRealSource7.errors.txt index 9103a77c23..e91833fac9 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource7.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource7.errors.txt @@ -1,3 +1,4 @@ +parserRealSource7.ts(4,21): error TS6053: File 'typescript.ts' not found. parserRealSource7.ts(12,38): error TS2304: Cannot find name 'ASTList'. parserRealSource7.ts(12,62): error TS2304: Cannot find name 'TypeLink'. parserRealSource7.ts(16,37): error TS2552: Cannot find name 'TypeLink'. Did you mean 'typeLink'? @@ -303,11 +304,13 @@ parserRealSource7.ts(827,34): error TS2304: Cannot find name 'NodeType'. parserRealSource7.ts(828,13): error TS2304: Cannot find name 'popTypeCollectionScope'. -==== parserRealSource7.ts (303 errors) ==== +==== parserRealSource7.ts (304 errors) ==== // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. module TypeScript { export class Continuation { diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource7.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource7.errors.txt.diff index beb218b82b..0b6378c5c9 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource7.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource7.errors.txt.diff @@ -1,11 +1,6 @@ --- old.parserRealSource7.errors.txt +++ new.parserRealSource7.errors.txt -@@= skipped -0, +0 lines =@@ --parserRealSource7.ts(4,21): error TS6053: File 'typescript.ts' not found. - parserRealSource7.ts(12,38): error TS2304: Cannot find name 'ASTList'. - parserRealSource7.ts(12,62): error TS2304: Cannot find name 'TypeLink'. - parserRealSource7.ts(16,37): error TS2552: Cannot find name 'TypeLink'. Did you mean 'typeLink'? -@@= skipped -10, +9 lines =@@ +@@= skipped -10, +10 lines =@@ parserRealSource7.ts(34,68): error TS2304: Cannot find name 'TypeCollectionContext'. parserRealSource7.ts(35,25): error TS2304: Cannot find name 'ValueLocation'. parserRealSource7.ts(36,30): error TS2304: Cannot find name 'TypeLink'. @@ -93,22 +88,7 @@ parserRealSource7.ts(535,53): error TS2304: Cannot find name 'VarFlags'. parserRealSource7.ts(535,75): error TS2304: Cannot find name 'VarFlags'. parserRealSource7.ts(539,38): error TS2304: Cannot find name 'SymbolFlags'. -@@= skipped -86, +86 lines =@@ - parserRealSource7.ts(828,13): error TS2304: Cannot find name 'popTypeCollectionScope'. - - --==== parserRealSource7.ts (304 errors) ==== -+==== parserRealSource7.ts (303 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// -- ~~~~~~~~~~~~~ --!!! error TS6053: File 'typescript.ts' not found. - - module TypeScript { - export class Continuation { -@@= skipped -72, +70 lines =@@ +@@= skipped -158, +158 lines =@@ var fieldSymbol = new FieldSymbol("prototype", ast.minChar, ~~~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource8.errors.txt b/testdata/baselines/reference/submodule/conformance/parserRealSource8.errors.txt index 359492c310..56c4a714dc 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource8.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource8.errors.txt @@ -1,3 +1,4 @@ +parserRealSource8.ts(4,21): error TS6053: File 'typescript.ts' not found. parserRealSource8.ts(9,41): error TS2304: Cannot find name 'ScopeChain'. parserRealSource8.ts(10,39): error TS2304: Cannot find name 'TypeFlow'. parserRealSource8.ts(11,43): error TS2304: Cannot find name 'ModuleDeclaration'. @@ -129,11 +130,13 @@ parserRealSource8.ts(453,38): error TS2304: Cannot find name 'NodeType'. parserRealSource8.ts(454,35): error TS2552: Cannot find name 'Catch'. Did you mean 'Cache'? -==== parserRealSource8.ts (129 errors) ==== +==== parserRealSource8.ts (130 errors) ==== // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. module TypeScript { diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource8.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource8.errors.txt.diff index c6ad58808b..b10455680c 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource8.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource8.errors.txt.diff @@ -1,11 +1,6 @@ --- old.parserRealSource8.errors.txt +++ new.parserRealSource8.errors.txt -@@= skipped -0, +0 lines =@@ --parserRealSource8.ts(4,21): error TS6053: File 'typescript.ts' not found. - parserRealSource8.ts(9,41): error TS2304: Cannot find name 'ScopeChain'. - parserRealSource8.ts(10,39): error TS2304: Cannot find name 'TypeFlow'. - parserRealSource8.ts(11,43): error TS2304: Cannot find name 'ModuleDeclaration'. -@@= skipped -39, +38 lines =@@ +@@= skipped -39, +39 lines =@@ parserRealSource8.ts(160,76): error TS2304: Cannot find name 'StringHashTable'. parserRealSource8.ts(160,99): error TS2304: Cannot find name 'StringHashTable'. parserRealSource8.ts(162,28): error TS2304: Cannot find name 'Type'. @@ -35,23 +30,11 @@ parserRealSource8.ts(449,76): error TS2304: Cannot find name 'FncFlags'. parserRealSource8.ts(453,38): error TS2304: Cannot find name 'NodeType'. -parserRealSource8.ts(454,35): error TS2304: Cannot find name 'Catch'. -- -- --==== parserRealSource8.ts (130 errors) ==== +parserRealSource8.ts(454,35): error TS2552: Cannot find name 'Catch'. Did you mean 'Cache'? -+ -+ -+==== parserRealSource8.ts (129 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// -- ~~~~~~~~~~~~~ --!!! error TS6053: File 'typescript.ts' not found. - - module TypeScript { - -@@= skipped -252, +250 lines =@@ + + + ==== parserRealSource8.ts (130 errors) ==== +@@= skipped -252, +252 lines =@@ !!! error TS2304: Cannot find name 'Type'. var withSymbol = new WithSymbol(withStmt.minChar, context.typeFlow.checker.locationInfo.unitIndex, withType); ~~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource9.errors.txt b/testdata/baselines/reference/submodule/conformance/parserRealSource9.errors.txt index dffb11e04a..9fd2058cb8 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource9.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource9.errors.txt @@ -1,3 +1,4 @@ +parserRealSource9.ts(4,21): error TS6053: File 'typescript.ts' not found. parserRealSource9.ts(8,38): error TS2304: Cannot find name 'TypeChecker'. parserRealSource9.ts(9,48): error TS2304: Cannot find name 'TypeLink'. parserRealSource9.ts(9,67): error TS2304: Cannot find name 'SymbolScope'. @@ -38,11 +39,13 @@ parserRealSource9.ts(200,28): error TS2304: Cannot find name 'SymbolScope'. parserRealSource9.ts(200,48): error TS2304: Cannot find name 'IHashTable'. -==== parserRealSource9.ts (38 errors) ==== +==== parserRealSource9.ts (39 errors) ==== // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. module TypeScript { export class Binder { diff --git a/testdata/baselines/reference/submodule/conformance/parserRealSource9.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserRealSource9.errors.txt.diff index ec66794d0e..7126ae5383 100644 --- a/testdata/baselines/reference/submodule/conformance/parserRealSource9.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/parserRealSource9.errors.txt.diff @@ -1,11 +1,6 @@ --- old.parserRealSource9.errors.txt +++ new.parserRealSource9.errors.txt -@@= skipped -0, +0 lines =@@ --parserRealSource9.ts(4,21): error TS6053: File 'typescript.ts' not found. - parserRealSource9.ts(8,38): error TS2304: Cannot find name 'TypeChecker'. - parserRealSource9.ts(9,48): error TS2304: Cannot find name 'TypeLink'. - parserRealSource9.ts(9,67): error TS2304: Cannot find name 'SymbolScope'. -@@= skipped -9, +8 lines =@@ +@@= skipped -9, +9 lines =@@ parserRealSource9.ts(67,54): error TS2304: Cannot find name 'SignatureGroup'. parserRealSource9.ts(67,77): error TS2304: Cannot find name 'SymbolScope'. parserRealSource9.ts(67,104): error TS2304: Cannot find name 'Type'. @@ -23,20 +18,7 @@ parserRealSource9.ts(197,20): error TS2339: Property 'bound' does not exist on type 'Symbol'. parserRealSource9.ts(200,28): error TS2304: Cannot find name 'SymbolScope'. parserRealSource9.ts(200,48): error TS2304: Cannot find name 'IHashTable'. - - --==== parserRealSource9.ts (39 errors) ==== -+==== parserRealSource9.ts (38 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// -- ~~~~~~~~~~~~~ --!!! error TS6053: File 'typescript.ts' not found. - - module TypeScript { - export class Binder { -@@= skipped -115, +113 lines =@@ +@@= skipped -115, +115 lines =@@ // check that last parameter has an array type var lastParam = signature.parameters[paramLen - 1]; ~~~~~~~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/conformance/parserharness.errors.txt b/testdata/baselines/reference/submodule/conformance/parserharness.errors.txt index 31a75354a8..09efc779eb 100644 --- a/testdata/baselines/reference/submodule/conformance/parserharness.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserharness.errors.txt @@ -1,3 +1,7 @@ +parserharness.ts(16,21): error TS6053: File '..\compiler\io.ts' not found. +parserharness.ts(17,21): error TS6053: File '..\compiler\typescript.ts' not found. +parserharness.ts(18,21): error TS6053: File '..\services\typescriptServices.ts' not found. +parserharness.ts(19,21): error TS6053: File 'diff.ts' not found. parserharness.ts(21,21): error TS2749: 'Harness.Assert' refers to a value, but is being used as a type here. Did you mean 'typeof Harness.Assert'? parserharness.ts(25,17): error TS2304: Cannot find name 'IIO'. parserharness.ts(41,12): error TS2304: Cannot find name 'ActiveXObject'. @@ -106,7 +110,7 @@ parserharness.ts(1787,68): error TS2503: Cannot find namespace 'Services'. parserharness.ts(2030,32): error TS2552: Cannot find name 'Diff'. Did you mean 'diff'? -==== parserharness.ts (106 errors) ==== +==== parserharness.ts (110 errors) ==== // // Copyright (c) Microsoft Corporation. All rights reserved. // @@ -123,9 +127,17 @@ parserharness.ts(2030,32): error TS2552: Cannot find name 'Diff'. Did you mean ' // /// + ~~~~~~~~~~~~~~~~~ +!!! error TS6053: File '..\compiler\io.ts' not found. /// + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS6053: File '..\compiler\typescript.ts' not found. /// + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS6053: File '..\services\typescriptServices.ts' not found. /// + ~~~~~~~ +!!! error TS6053: File 'diff.ts' not found. declare var assert: Harness.Assert; ~~~~~~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/conformance/parserharness.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserharness.errors.txt.diff index e36a9f9461..31000d1b46 100644 --- a/testdata/baselines/reference/submodule/conformance/parserharness.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/parserharness.errors.txt.diff @@ -4,11 +4,13 @@ -parserharness.ts(16,21): error TS6053: File '../compiler/io.ts' not found. -parserharness.ts(17,21): error TS6053: File '../compiler/typescript.ts' not found. -parserharness.ts(18,21): error TS6053: File '../services/typescriptServices.ts' not found. --parserharness.ts(19,21): error TS6053: File 'diff.ts' not found. ++parserharness.ts(16,21): error TS6053: File '..\compiler\io.ts' not found. ++parserharness.ts(17,21): error TS6053: File '..\compiler\typescript.ts' not found. ++parserharness.ts(18,21): error TS6053: File '..\services\typescriptServices.ts' not found. + parserharness.ts(19,21): error TS6053: File 'diff.ts' not found. parserharness.ts(21,21): error TS2749: 'Harness.Assert' refers to a value, but is being used as a type here. Did you mean 'typeof Harness.Assert'? parserharness.ts(25,17): error TS2304: Cannot find name 'IIO'. - parserharness.ts(41,12): error TS2304: Cannot find name 'ActiveXObject'. -@@= skipped -17, +13 lines =@@ +@@= skipped -17, +17 lines =@@ parserharness.ts(724,29): error TS2304: Cannot find name 'ITextWriter'. parserharness.ts(754,53): error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? parserharness.ts(764,56): error TS2503: Cannot find namespace 'TypeScript'. @@ -141,35 +143,28 @@ parserharness.ts(1787,38): error TS2503: Cannot find namespace 'Services'. parserharness.ts(1787,68): error TS2503: Cannot find namespace 'Services'. -parserharness.ts(2030,32): error TS2304: Cannot find name 'Diff'. -- -- --==== parserharness.ts (110 errors) ==== +parserharness.ts(2030,32): error TS2552: Cannot find name 'Diff'. Did you mean 'diff'? -+ -+ -+==== parserharness.ts (106 errors) ==== - // - // Copyright (c) Microsoft Corporation. All rights reserved. - // -@@= skipped -20, +20 lines =@@ - // + + + ==== parserharness.ts (110 errors) ==== +@@= skipped -21, +21 lines =@@ /// -- ~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~ -!!! error TS6053: File '../compiler/io.ts' not found. ++!!! error TS6053: File '..\compiler\io.ts' not found. /// -- ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS6053: File '../compiler/typescript.ts' not found. ++!!! error TS6053: File '..\compiler\typescript.ts' not found. /// -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS6053: File '../services/typescriptServices.ts' not found. ++!!! error TS6053: File '..\services\typescriptServices.ts' not found. /// -- ~~~~~~~ --!!! error TS6053: File 'diff.ts' not found. - - declare var assert: Harness.Assert; - ~~~~~~~~~~~~~~ -@@= skipped -790, +782 lines =@@ + ~~~~~~~ + !!! error TS6053: File 'diff.ts' not found. +@@= skipped -789, +789 lines =@@ !!! error TS2503: Cannot find namespace 'TypeScript'. var compiler = c || new TypeScript.TypeScriptCompiler(stderr); ~~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/conformance/parserindenter.errors.txt b/testdata/baselines/reference/submodule/conformance/parserindenter.errors.txt index c3eb8c504f..ecef6e2a1d 100644 --- a/testdata/baselines/reference/submodule/conformance/parserindenter.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserindenter.errors.txt @@ -1,3 +1,4 @@ +parserindenter.ts(16,21): error TS6053: File 'formatting.ts' not found. parserindenter.ts(20,38): error TS2304: Cannot find name 'ILineIndenationResolver'. parserindenter.ts(22,33): error TS2304: Cannot find name 'IndentationBag'. parserindenter.ts(24,42): error TS2304: Cannot find name 'Dictionary_int_int'. @@ -127,7 +128,7 @@ parserindenter.ts(735,42): error TS2304: Cannot find name 'TokenSpan'. parserindenter.ts(736,38): error TS2304: Cannot find name 'TypeScript'. -==== parserindenter.ts (127 errors) ==== +==== parserindenter.ts (128 errors) ==== // // Copyright (c) Microsoft Corporation. All rights reserved. // @@ -144,6 +145,8 @@ parserindenter.ts(736,38): error TS2304: Cannot find name 'TypeScript'. // /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'formatting.ts' not found. module Formatting { diff --git a/testdata/baselines/reference/submodule/conformance/parserindenter.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserindenter.errors.txt.diff index 1497927902..01e624fb02 100644 --- a/testdata/baselines/reference/submodule/conformance/parserindenter.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/parserindenter.errors.txt.diff @@ -1,11 +1,6 @@ --- old.parserindenter.errors.txt +++ new.parserindenter.errors.txt -@@= skipped -0, +0 lines =@@ --parserindenter.ts(16,21): error TS6053: File 'formatting.ts' not found. - parserindenter.ts(20,38): error TS2304: Cannot find name 'ILineIndenationResolver'. - parserindenter.ts(22,33): error TS2304: Cannot find name 'IndentationBag'. - parserindenter.ts(24,42): error TS2304: Cannot find name 'Dictionary_int_int'. -@@= skipped -10, +9 lines =@@ +@@= skipped -10, +10 lines =@@ parserindenter.ts(37,48): error TS2304: Cannot find name 'Dictionary_int_int'. parserindenter.ts(47,43): error TS2304: Cannot find name 'TokenSpan'. parserindenter.ts(47,65): error TS2304: Cannot find name 'TokenSpan'. @@ -94,25 +89,7 @@ parserindenter.ts(717,22): error TS2304: Cannot find name 'AuthorTokenKind'. parserindenter.ts(718,73): error TS2304: Cannot find name 'AuthorParseNodeKind'. parserindenter.ts(721,22): error TS2304: Cannot find name 'AuthorTokenKind'. -@@= skipped -23, +23 lines =@@ - parserindenter.ts(736,38): error TS2304: Cannot find name 'TypeScript'. - - --==== parserindenter.ts (128 errors) ==== -+==== parserindenter.ts (127 errors) ==== - // - // Copyright (c) Microsoft Corporation. All rights reserved. - // -@@= skipped -17, +17 lines =@@ - // - - /// -- ~~~~~~~~~~~~~ --!!! error TS6053: File 'formatting.ts' not found. - - - module Formatting { -@@= skipped -58, +56 lines =@@ +@@= skipped -98, +98 lines =@@ ~~~~~~~~~ !!! error TS2304: Cannot find name 'TokenSpan'. ~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/conformance/scannertest1.errors.txt b/testdata/baselines/reference/submodule/conformance/scannertest1.errors.txt index ca1c2ae9a6..833098432b 100644 --- a/testdata/baselines/reference/submodule/conformance/scannertest1.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/scannertest1.errors.txt @@ -1,3 +1,4 @@ +scannertest1.ts(1,21): error TS6053: File 'References.ts' not found. scannertest1.ts(5,21): error TS2304: Cannot find name 'CharacterCodes'. scannertest1.ts(5,47): error TS2304: Cannot find name 'CharacterCodes'. scannertest1.ts(9,16): error TS2662: Cannot find name 'isDecimalDigit'. Did you mean the static member 'CharacterInfo.isDecimalDigit'? @@ -15,8 +16,10 @@ scannertest1.ts(19,23): error TS2304: Cannot find name 'CharacterCodes'. scannertest1.ts(20,23): error TS2304: Cannot find name 'CharacterCodes'. -==== scannertest1.ts (15 errors) ==== +==== scannertest1.ts (16 errors) ==== /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'References.ts' not found. class CharacterInfo { public static isDecimalDigit(c: number): boolean { diff --git a/testdata/baselines/reference/submodule/conformance/scannertest1.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/scannertest1.errors.txt.diff deleted file mode 100644 index 2d8965d4df..0000000000 --- a/testdata/baselines/reference/submodule/conformance/scannertest1.errors.txt.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.scannertest1.errors.txt -+++ new.scannertest1.errors.txt -@@= skipped -0, +0 lines =@@ --scannertest1.ts(1,21): error TS6053: File 'References.ts' not found. - scannertest1.ts(5,21): error TS2304: Cannot find name 'CharacterCodes'. - scannertest1.ts(5,47): error TS2304: Cannot find name 'CharacterCodes'. - scannertest1.ts(9,16): error TS2662: Cannot find name 'isDecimalDigit'. Did you mean the static member 'CharacterInfo.isDecimalDigit'? -@@= skipped -15, +14 lines =@@ - scannertest1.ts(20,23): error TS2304: Cannot find name 'CharacterCodes'. - - --==== scannertest1.ts (16 errors) ==== -+==== scannertest1.ts (15 errors) ==== - /// -- ~~~~~~~~~~~~~ --!!! error TS6053: File 'References.ts' not found. - - class CharacterInfo { - public static isDecimalDigit(c: number): boolean { \ No newline at end of file diff --git a/testdata/baselines/reference/tsc/incremental/when-global-file-is-added,-the-signatures-are-updated.js b/testdata/baselines/reference/tsc/incremental/when-global-file-is-added,-the-signatures-are-updated.js index ffe2a4f5a4..09d3230fdb 100644 --- a/testdata/baselines/reference/tsc/incremental/when-global-file-is-added,-the-signatures-are-updated.js +++ b/testdata/baselines/reference/tsc/incremental/when-global-file-is-added,-the-signatures-are-updated.js @@ -18,8 +18,25 @@ function main() { } } tsgo -ExitStatus:: Success +ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: +src/anotherFileWithSameReferenes.ts:2:22 - error TS6053: File './fileNotFound.ts' not found. + +2 /// +   ~~~~~~~~~~~~~~~~~ + +src/main.ts:2:22 - error TS6053: File './fileNotFound.ts' not found. + +2 /// +   ~~~~~~~~~~~~~~~~~ + + +Found 2 errors in 2 files. + +Errors Files + 1 src/anotherFileWithSameReferenes.ts:2 + 1 src/main.ts:2 + //// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib* /// interface Boolean {} @@ -66,7 +83,7 @@ declare function main(): void; function main() { } //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./src/filePresent.ts","./src/anotherFileWithSameReferenes.ts","./src/main.ts","./src/fileNotFound.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"90fb0189e81698eb72c5c92453cf2ab4-function something() { return 10; }","signature":"427bfa05de25170a9630b13346cde60c-declare function something(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e70a47c0753d68cebbf1d60d9abf7212-/// \n/// \nfunction anotherFileWithSameReferenes() { }","signature":"d30ad74c2e698ad06cc29f2ea6d12014-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4e3124823e3ef0a7f1ce70b317b1e4c8-/// \n/// \nfunction main() { }","signature":"50f7afe296d55bfece856bfb6f7ad6c9-declare function main(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[2,5]],"options":{"composite":true},"referencedMap":[[3,1],[4,1]],"latestChangedDtsFile":"./src/main.d.ts"} +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./src/filePresent.ts","./src/anotherFileWithSameReferenes.ts","./src/main.ts","./src/fileNotFound.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"90fb0189e81698eb72c5c92453cf2ab4-function something() { return 10; }","signature":"427bfa05de25170a9630b13346cde60c-declare function something(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e70a47c0753d68cebbf1d60d9abf7212-/// \n/// \nfunction anotherFileWithSameReferenes() { }","signature":"d30ad74c2e698ad06cc29f2ea6d12014-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4e3124823e3ef0a7f1ce70b317b1e4c8-/// \n/// \nfunction main() { }","signature":"50f7afe296d55bfece856bfb6f7ad6c9-declare function main(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[2,5]],"options":{"composite":true},"referencedMap":[[3,1],[4,1]],"semanticDiagnosticsPerFile":[[3,[{"pos":62,"end":79,"code":6053,"category":1,"messageKey":"File_0_not_found_6053","messageArgs":["./fileNotFound.ts"]}]],[4,[{"pos":62,"end":79,"code":6053,"category":1,"messageKey":"File_0_not_found_6053","messageArgs":["./fileNotFound.ts"]}]]],"latestChangedDtsFile":"./src/main.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", @@ -162,8 +179,40 @@ function main() { } "./src/fileNotFound.ts" ] }, + "semanticDiagnosticsPerFile": [ + [ + "./src/anotherFileWithSameReferenes.ts", + [ + { + "pos": 62, + "end": 79, + "code": 6053, + "category": 1, + "messageKey": "File_0_not_found_6053", + "messageArgs": [ + "./fileNotFound.ts" + ] + } + ] + ], + [ + "./src/main.ts", + [ + { + "pos": 62, + "end": 79, + "code": 6053, + "category": 1, + "messageKey": "File_0_not_found_6053", + "messageArgs": [ + "./fileNotFound.ts" + ] + } + ] + ] + ], "latestChangedDtsFile": "./src/main.d.ts", - "size": 1910 + "size": 2189 } tsconfig.json:: @@ -181,8 +230,25 @@ Signatures:: Edit [0]:: no change tsgo -ExitStatus:: Success +ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: +src/anotherFileWithSameReferenes.ts:2:22 - error TS6053: File './fileNotFound.ts' not found. + +2 /// +   ~~~~~~~~~~~~~~~~~ + +src/main.ts:2:22 - error TS6053: File './fileNotFound.ts' not found. + +2 /// +   ~~~~~~~~~~~~~~~~~ + + +Found 2 errors in 2 files. + +Errors Files + 1 src/anotherFileWithSameReferenes.ts:2 + 1 src/main.ts:2 + tsconfig.json:: SemanticDiagnostics:: @@ -196,8 +262,25 @@ Edit [1]:: Modify main file function main() { }something(); tsgo -ExitStatus:: Success +ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: +src/anotherFileWithSameReferenes.ts:2:22 - error TS6053: File './fileNotFound.ts' not found. + +2 /// +   ~~~~~~~~~~~~~~~~~ + +src/main.ts:2:22 - error TS6053: File './fileNotFound.ts' not found. + +2 /// +   ~~~~~~~~~~~~~~~~~ + + +Found 2 errors in 2 files. + +Errors Files + 1 src/anotherFileWithSameReferenes.ts:2 + 1 src/main.ts:2 + //// [/home/src/workspaces/project/src/main.js] *modified* /// /// @@ -205,7 +288,7 @@ function main() { } something(); //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./src/filePresent.ts","./src/anotherFileWithSameReferenes.ts","./src/main.ts","./src/fileNotFound.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"90fb0189e81698eb72c5c92453cf2ab4-function something() { return 10; }","signature":"427bfa05de25170a9630b13346cde60c-declare function something(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e70a47c0753d68cebbf1d60d9abf7212-/// \n/// \nfunction anotherFileWithSameReferenes() { }","signature":"d30ad74c2e698ad06cc29f2ea6d12014-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9ece2abeadfdd790ae17f754892e8402-/// \n/// \nfunction main() { }something();","signature":"50f7afe296d55bfece856bfb6f7ad6c9-declare function main(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[2,5]],"options":{"composite":true},"referencedMap":[[3,1],[4,1]],"latestChangedDtsFile":"./src/main.d.ts"} +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./src/filePresent.ts","./src/anotherFileWithSameReferenes.ts","./src/main.ts","./src/fileNotFound.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"90fb0189e81698eb72c5c92453cf2ab4-function something() { return 10; }","signature":"427bfa05de25170a9630b13346cde60c-declare function something(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e70a47c0753d68cebbf1d60d9abf7212-/// \n/// \nfunction anotherFileWithSameReferenes() { }","signature":"d30ad74c2e698ad06cc29f2ea6d12014-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9ece2abeadfdd790ae17f754892e8402-/// \n/// \nfunction main() { }something();","signature":"50f7afe296d55bfece856bfb6f7ad6c9-declare function main(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[2,5]],"options":{"composite":true},"referencedMap":[[3,1],[4,1]],"semanticDiagnosticsPerFile":[[3,[{"pos":62,"end":79,"code":6053,"category":1,"messageKey":"File_0_not_found_6053","messageArgs":["./fileNotFound.ts"]}]],[4,[{"pos":62,"end":79,"code":6053,"category":1,"messageKey":"File_0_not_found_6053","messageArgs":["./fileNotFound.ts"]}]]],"latestChangedDtsFile":"./src/main.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -301,8 +384,40 @@ something(); "./src/fileNotFound.ts" ] }, + "semanticDiagnosticsPerFile": [ + [ + "./src/anotherFileWithSameReferenes.ts", + [ + { + "pos": 62, + "end": 79, + "code": 6053, + "category": 1, + "messageKey": "File_0_not_found_6053", + "messageArgs": [ + "./fileNotFound.ts" + ] + } + ] + ], + [ + "./src/main.ts", + [ + { + "pos": 62, + "end": 79, + "code": 6053, + "category": 1, + "messageKey": "File_0_not_found_6053", + "messageArgs": [ + "./fileNotFound.ts" + ] + } + ] + ] + ], "latestChangedDtsFile": "./src/main.d.ts", - "size": 1922 + "size": 2201 } tsconfig.json:: @@ -319,8 +434,25 @@ Edit [2]:: Modify main file again function main() { }something();something(); tsgo -ExitStatus:: Success +ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: +src/anotherFileWithSameReferenes.ts:2:22 - error TS6053: File './fileNotFound.ts' not found. + +2 /// +   ~~~~~~~~~~~~~~~~~ + +src/main.ts:2:22 - error TS6053: File './fileNotFound.ts' not found. + +2 /// +   ~~~~~~~~~~~~~~~~~ + + +Found 2 errors in 2 files. + +Errors Files + 1 src/anotherFileWithSameReferenes.ts:2 + 1 src/main.ts:2 + //// [/home/src/workspaces/project/src/main.js] *modified* /// /// @@ -329,7 +461,7 @@ something(); something(); //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./src/filePresent.ts","./src/anotherFileWithSameReferenes.ts","./src/main.ts","./src/fileNotFound.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"90fb0189e81698eb72c5c92453cf2ab4-function something() { return 10; }","signature":"427bfa05de25170a9630b13346cde60c-declare function something(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e70a47c0753d68cebbf1d60d9abf7212-/// \n/// \nfunction anotherFileWithSameReferenes() { }","signature":"d30ad74c2e698ad06cc29f2ea6d12014-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1077a6c3f5daec777c602b0aac3793b9-/// \n/// \nfunction main() { }something();something();","signature":"50f7afe296d55bfece856bfb6f7ad6c9-declare function main(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[2,5]],"options":{"composite":true},"referencedMap":[[3,1],[4,1]],"latestChangedDtsFile":"./src/main.d.ts"} +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.d.ts","./src/filePresent.ts","./src/anotherFileWithSameReferenes.ts","./src/main.ts","./src/fileNotFound.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"90fb0189e81698eb72c5c92453cf2ab4-function something() { return 10; }","signature":"427bfa05de25170a9630b13346cde60c-declare function something(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e70a47c0753d68cebbf1d60d9abf7212-/// \n/// \nfunction anotherFileWithSameReferenes() { }","signature":"d30ad74c2e698ad06cc29f2ea6d12014-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1077a6c3f5daec777c602b0aac3793b9-/// \n/// \nfunction main() { }something();something();","signature":"50f7afe296d55bfece856bfb6f7ad6c9-declare function main(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[2,5]],"options":{"composite":true},"referencedMap":[[3,1],[4,1]],"semanticDiagnosticsPerFile":[[3,[{"pos":62,"end":79,"code":6053,"category":1,"messageKey":"File_0_not_found_6053","messageArgs":["./fileNotFound.ts"]}]],[4,[{"pos":62,"end":79,"code":6053,"category":1,"messageKey":"File_0_not_found_6053","messageArgs":["./fileNotFound.ts"]}]]],"latestChangedDtsFile":"./src/main.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -425,8 +557,40 @@ something(); "./src/fileNotFound.ts" ] }, + "semanticDiagnosticsPerFile": [ + [ + "./src/anotherFileWithSameReferenes.ts", + [ + { + "pos": 62, + "end": 79, + "code": 6053, + "category": 1, + "messageKey": "File_0_not_found_6053", + "messageArgs": [ + "./fileNotFound.ts" + ] + } + ] + ], + [ + "./src/main.ts", + [ + { + "pos": 62, + "end": 79, + "code": 6053, + "category": 1, + "messageKey": "File_0_not_found_6053", + "messageArgs": [ + "./fileNotFound.ts" + ] + } + ] + ] + ], "latestChangedDtsFile": "./src/main.d.ts", - "size": 1934 + "size": 2213 } tsconfig.json:: @@ -446,8 +610,25 @@ function main() { }something();something();foo(); function foo() { return 20; } tsgo -ExitStatus:: Success +ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: +src/anotherFileWithSameReferenes.ts:2:22 - error TS6053: File './fileNotFound.ts' not found. + +2 /// +   ~~~~~~~~~~~~~~~~~ + +src/main.ts:3:22 - error TS6053: File './fileNotFound.ts' not found. + +3 /// +   ~~~~~~~~~~~~~~~~~ + + +Found 2 errors in 2 files. + +Errors Files + 1 src/anotherFileWithSameReferenes.ts:2 + 1 src/main.ts:3 + //// [/home/src/workspaces/project/src/main.js] *modified* /// /// @@ -464,7 +645,7 @@ declare function foo(): number; function foo() { return 20; } //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["lib.d.ts","./src/filePresent.ts","./src/anotherFileWithSameReferenes.ts","./src/newFile.ts","./src/main.ts","./src/fileNotFound.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"90fb0189e81698eb72c5c92453cf2ab4-function something() { return 10; }","signature":"427bfa05de25170a9630b13346cde60c-declare function something(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e70a47c0753d68cebbf1d60d9abf7212-/// \n/// \nfunction anotherFileWithSameReferenes() { }","signature":"d30ad74c2e698ad06cc29f2ea6d12014-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"cf329dc888a898a1403ba3e35c2ec68e-function foo() { return 20; }","signature":"67af86f8c5b618332b620488f3be2c41-declare function foo(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"bc6af6fddab57e87e44b7bf54d933e49-/// \n/// \n/// \nfunction main() { }something();something();foo();","signature":"50f7afe296d55bfece856bfb6f7ad6c9-declare function main(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[2,6],[2,4,6]],"options":{"composite":true},"referencedMap":[[3,1],[5,2]],"latestChangedDtsFile":"./src/newFile.d.ts"} +{"version":"FakeTSVersion","root":[[2,5]],"fileNames":["lib.d.ts","./src/filePresent.ts","./src/anotherFileWithSameReferenes.ts","./src/newFile.ts","./src/main.ts","./src/fileNotFound.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"90fb0189e81698eb72c5c92453cf2ab4-function something() { return 10; }","signature":"427bfa05de25170a9630b13346cde60c-declare function something(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e70a47c0753d68cebbf1d60d9abf7212-/// \n/// \nfunction anotherFileWithSameReferenes() { }","signature":"d30ad74c2e698ad06cc29f2ea6d12014-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"cf329dc888a898a1403ba3e35c2ec68e-function foo() { return 20; }","signature":"67af86f8c5b618332b620488f3be2c41-declare function foo(): number;\n","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"bc6af6fddab57e87e44b7bf54d933e49-/// \n/// \n/// \nfunction main() { }something();something();foo();","signature":"50f7afe296d55bfece856bfb6f7ad6c9-declare function main(): void;\n","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[2,6],[2,4,6]],"options":{"composite":true},"referencedMap":[[3,1],[5,2]],"semanticDiagnosticsPerFile":[[3,[{"pos":62,"end":79,"code":6053,"category":1,"messageKey":"File_0_not_found_6053","messageArgs":["./fileNotFound.ts"]}]],[5,[{"pos":99,"end":116,"code":6053,"category":1,"messageKey":"File_0_not_found_6053","messageArgs":["./fileNotFound.ts"]}]]],"latestChangedDtsFile":"./src/newFile.d.ts"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -581,8 +762,40 @@ function foo() { return 20; } "./src/fileNotFound.ts" ] }, + "semanticDiagnosticsPerFile": [ + [ + "./src/anotherFileWithSameReferenes.ts", + [ + { + "pos": 62, + "end": 79, + "code": 6053, + "category": 1, + "messageKey": "File_0_not_found_6053", + "messageArgs": [ + "./fileNotFound.ts" + ] + } + ] + ], + [ + "./src/main.ts", + [ + { + "pos": 99, + "end": 116, + "code": 6053, + "category": 1, + "messageKey": "File_0_not_found_6053", + "messageArgs": [ + "./fileNotFound.ts" + ] + } + ] + ] + ], "latestChangedDtsFile": "./src/newFile.d.ts", - "size": 2216 + "size": 2496 } tsconfig.json::