diff --git a/internal/checker/checker.go b/internal/checker/checker.go index 8a0bd4bf35f..3debeafbddf 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -13406,21 +13406,21 @@ func (c *Checker) getCannotFindNameDiagnosticForName(node *ast.Node) *diagnostic case "document", "console": return diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom case "$": - return core.IfElse(c.compilerOptions.Types != nil, - diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig, - diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery) - case "describe", "suite", "it", "test": - return core.IfElse(c.compilerOptions.Types != nil, - diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig, - diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha) - case "process", "require", "Buffer", "module": - return core.IfElse(c.compilerOptions.Types != nil, - diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig, - diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode) + return core.IfElse(c.compilerOptions.UsesWildcardTypes(), + diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery, + diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig) + case "beforeEach", "describe", "suite", "it", "test": + return core.IfElse(c.compilerOptions.UsesWildcardTypes(), + diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha, + diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig) + case "process", "require", "Buffer", "module", "NodeJS": + return core.IfElse(c.compilerOptions.UsesWildcardTypes(), + diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode, + diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig) case "Bun": - return core.IfElse(c.compilerOptions.Types != nil, - diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig, - diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun) + return core.IfElse(c.compilerOptions.UsesWildcardTypes(), + diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun, + diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig) case "Map", "Set", "Promise", "ast.Symbol", "WeakMap", "WeakSet", "Iterator", "AsyncIterator", "SharedArrayBuffer", "Atomics", "AsyncIterable", "AsyncIterableIterator", "AsyncGenerator", "AsyncGeneratorFunction", "BigInt", "Reflect", "BigInt64Array", "BigUint64Array": return diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later @@ -14548,11 +14548,26 @@ func (c *Checker) markSymbolOfAliasDeclarationIfTypeOnly(aliasDeclaration *ast.N } func (c *Checker) resolveExternalModuleName(location *ast.Node, moduleReferenceExpression *ast.Node, ignoreErrors bool) *ast.Symbol { - errorMessage := diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations + errorMessage := c.getCannotResolveModuleNameErrorForSpecificModule(moduleReferenceExpression) + if errorMessage == nil { + errorMessage = diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations + } ignoreErrors = ignoreErrors || c.compilerOptions.NoCheck.IsTrue() return c.resolveExternalModuleNameWorker(location, moduleReferenceExpression, core.IfElse(ignoreErrors, nil, errorMessage), ignoreErrors, false /*isForAugmentation*/) } +func (c *Checker) getCannotResolveModuleNameErrorForSpecificModule(moduleName *ast.Node) *diagnostics.Message { + if ast.IsStringLiteral(moduleName) { + if core.NodeCoreModules()[moduleName.Text()] { + if c.compilerOptions.UsesWildcardTypes() { + return diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode + } + return diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig + } + } + return nil +} + func (c *Checker) resolveExternalModuleNameWorker(location *ast.Node, moduleReferenceExpression *ast.Node, moduleNotFoundError *diagnostics.Message, ignoreErrors bool, isForAugmentation bool) *ast.Symbol { if ast.IsStringLiteralLike(moduleReferenceExpression) { return c.resolveExternalModule(location, moduleReferenceExpression.Text(), moduleNotFoundError, core.IfElse(!ignoreErrors, moduleReferenceExpression, nil), isForAugmentation) diff --git a/internal/compiler/fileInclude.go b/internal/compiler/fileInclude.go index 180ec81a52c..aacf73ca72a 100644 --- a/internal/compiler/fileInclude.go +++ b/internal/compiler/fileInclude.go @@ -191,7 +191,7 @@ func (r *FileIncludeReason) computeDiagnostic(program *Program, toFileName func( } case fileIncludeKindAutomaticTypeDirectiveFile: data := r.asAutomaticTypeDirectiveFileData() - if program.Options().Types != nil { + if !program.Options().UsesWildcardTypes() { if data.packageId.Name != "" { return ast.NewCompilerDiagnostic(diagnostics.Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1, data.typeReference, data.packageId.String()) } else { @@ -277,7 +277,7 @@ func (r *FileIncludeReason) toRelatedInfo(program *Program) *ast.Diagnostic { } } case fileIncludeKindAutomaticTypeDirectiveFile: - if program.Options().Types != nil { + if !program.Options().UsesWildcardTypes() { data := r.asAutomaticTypeDirectiveFileData() if typesSyntax := tsoptions.GetOptionsSyntaxByArrayElementValue(program.includeProcessor.getCompilerOptionsObjectLiteralSyntax(program), "types", data.typeReference); typesSyntax != nil { return tsoptions.CreateDiagnosticForNodeInSourceFile(config.ConfigFile.SourceFile, typesSyntax.AsNode(), diagnostics.File_is_entry_point_of_type_library_specified_here) diff --git a/internal/core/compileroptions.go b/internal/core/compileroptions.go index 65f682f5d14..8149f66778e 100644 --- a/internal/core/compileroptions.go +++ b/internal/core/compileroptions.go @@ -2,6 +2,7 @@ package core import ( "reflect" + "slices" "strings" "github.com/microsoft/typescript-go/internal/collections" @@ -318,6 +319,11 @@ func (options *CompilerOptions) GetEffectiveTypeRoots(currentDirectory string) ( return typeRoots, false } +// UsesWildcardTypes returns true if this option's types array includes "*" +func (options *CompilerOptions) UsesWildcardTypes() bool { + return slices.Contains(options.Types, "*") +} + func (options *CompilerOptions) GetIsolatedModules() bool { return options.IsolatedModules == TSTrue || options.VerbatimModuleSyntax == TSTrue } diff --git a/internal/fourslash/_scripts/failingTests.txt b/internal/fourslash/_scripts/failingTests.txt index 09d0998c6c7..7d5049ebf45 100644 --- a/internal/fourslash/_scripts/failingTests.txt +++ b/internal/fourslash/_scripts/failingTests.txt @@ -17,7 +17,6 @@ TestAutoImportJsDocImport1 TestAutoImportModuleNone2 TestAutoImportNodeModuleSymlinkRenamed TestAutoImportNodeNextJSRequire -TestAutoImportPackageJsonFilterExistingImport3 TestAutoImportPackageJsonImportsCaseSensitivity TestAutoImportPackageRootPath TestAutoImportPathsNodeModules @@ -145,8 +144,6 @@ TestCompletionsImport_reExport_wrongName TestCompletionsImport_require_addToExisting TestCompletionsImport_typeOnly TestCompletionsImport_umdDefaultNoCrash1 -TestCompletionsImport_umdModules1_globalAccess -TestCompletionsImport_umdModules3_script TestCompletionsImport_uriStyleNodeCoreModules2 TestCompletionsImport_uriStyleNodeCoreModules3 TestCompletionsImport_windowsPathsProjectRelative diff --git a/internal/module/resolver.go b/internal/module/resolver.go index c5d24bb6c80..29a29cf9ce3 100644 --- a/internal/module/resolver.go +++ b/internal/module/resolver.go @@ -2026,11 +2026,15 @@ func ResolveConfig(moduleName string, containingFile string, host ResolutionHost } func GetAutomaticTypeDirectiveNames(options *core.CompilerOptions, host ResolutionHost) []string { - if options.Types != nil { - return options.Types + if !options.UsesWildcardTypes() { + if options.Types != nil { + return options.Types + } + return []string{} } - var result []string + // Walk the primary type lookup locations + var wildcardMatches []string typeRoots, _ := options.GetEffectiveTypeRoots(host.GetCurrentDirectory()) for _, root := range typeRoots { if host.FS().DirectoryExists(root) { @@ -2048,13 +2052,24 @@ func GetAutomaticTypeDirectiveNames(options *core.CompilerOptions, host Resoluti if !isNotNeededPackage { baseFileName := tspath.GetBaseFileName(normalized) if !strings.HasPrefix(baseFileName, ".") { - result = append(result, baseFileName) + wildcardMatches = append(wildcardMatches, baseFileName) } } } } } - return result + + // Order potentially matters in program construction, so substitute + // in the wildcard in the position it was specified in the types array + var result []string + for _, t := range options.Types { + if t == "*" { + result = append(result, wildcardMatches...) + } else { + result = append(result, t) + } + } + return core.Deduplicate(result) } type ResolvedEntrypoints struct { diff --git a/testdata/baselines/reference/submodule/compiler/anonymousModules.errors.txt b/testdata/baselines/reference/submodule/compiler/anonymousModules.errors.txt index 9ed762464d9..80b3447b5d0 100644 --- a/testdata/baselines/reference/submodule/compiler/anonymousModules.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/anonymousModules.errors.txt @@ -1,22 +1,22 @@ -anonymousModules.ts(1,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +anonymousModules.ts(1,1): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. anonymousModules.ts(1,8): error TS1437: Namespace must be given a name. -anonymousModules.ts(4,2): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +anonymousModules.ts(4,2): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. anonymousModules.ts(4,9): error TS1437: Namespace must be given a name. -anonymousModules.ts(10,2): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +anonymousModules.ts(10,2): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. anonymousModules.ts(10,9): error TS1437: Namespace must be given a name. ==== anonymousModules.ts (6 errors) ==== module { ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ~ !!! error TS1437: Namespace must be given a name. export var foo = 1; module { ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ~ !!! error TS1437: Namespace must be given a name. export var bar = 1; @@ -26,7 +26,7 @@ anonymousModules.ts(10,9): error TS1437: Namespace must be given a name. module { ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ~ !!! error TS1437: Namespace must be given a name. var x = bar; diff --git a/testdata/baselines/reference/submodule/compiler/anonymousModules.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/anonymousModules.errors.txt.diff deleted file mode 100644 index 266f8eae5e2..00000000000 --- a/testdata/baselines/reference/submodule/compiler/anonymousModules.errors.txt.diff +++ /dev/null @@ -1,39 +0,0 @@ ---- old.anonymousModules.errors.txt -+++ new.anonymousModules.errors.txt -@@= skipped -0, +0 lines =@@ --anonymousModules.ts(1,1): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+anonymousModules.ts(1,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - anonymousModules.ts(1,8): error TS1437: Namespace must be given a name. --anonymousModules.ts(4,2): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+anonymousModules.ts(4,2): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - anonymousModules.ts(4,9): error TS1437: Namespace must be given a name. --anonymousModules.ts(10,2): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+anonymousModules.ts(10,2): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - anonymousModules.ts(10,9): error TS1437: Namespace must be given a name. - - - ==== anonymousModules.ts (6 errors) ==== - module { - ~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - ~ - !!! error TS1437: Namespace must be given a name. - export var foo = 1; - - module { - ~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - ~ - !!! error TS1437: Namespace must be given a name. - export var bar = 1; -@@= skipped -25, +25 lines =@@ - - module { - ~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - ~ - !!! error TS1437: Namespace must be given a name. - var x = bar; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.errors.txt b/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.errors.txt index f18499170b0..6c99ac7a37d 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.errors.txt @@ -1,5 +1,5 @@ constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2503: Cannot find namespace 'module'. -constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. constructorWithIncompleteTypeAnnotation.ts(11,19): error TS1005: ';' expected. constructorWithIncompleteTypeAnnotation.ts(22,35): error TS1005: ')' expected. constructorWithIncompleteTypeAnnotation.ts(22,39): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -108,7 +108,7 @@ constructorWithIncompleteTypeAnnotation.ts(261,1): error TS1128: Declaration or ~~~~~~ !!! error TS2503: Cannot find namespace 'module'. ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ~ !!! error TS1005: ';' expected. diff --git a/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.errors.txt.diff index c164037b0fe..1b434c5b6c3 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.errors.txt.diff @@ -3,11 +3,8 @@ @@= skipped -0, +0 lines =@@ -error TS-1: Pre-emit (93) and post-emit (94) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here! constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2503: Cannot find namespace 'module'. --constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. + constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. constructorWithIncompleteTypeAnnotation.ts(11,19): error TS1005: ';' expected. - constructorWithIncompleteTypeAnnotation.ts(22,35): error TS1005: ')' expected. - constructorWithIncompleteTypeAnnotation.ts(22,39): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@= skipped -42, +41 lines =@@ constructorWithIncompleteTypeAnnotation.ts(159,30): error TS1005: '{' expected. constructorWithIncompleteTypeAnnotation.ts(159,31): error TS2304: Cannot find name 'Property'. @@ -36,16 +33,7 @@ ==== constructorWithIncompleteTypeAnnotation.ts (93 errors) ==== declare module "fs" { export class File { -@@= skipped -18, +15 lines =@@ - ~~~~~~ - !!! error TS2503: Cannot find namespace 'module'. - ~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - ~ - !!! error TS1005: ';' expected. - -@@= skipped -120, +120 lines =@@ +@@= skipped -138, +135 lines =@@ var undef = undefined; var _\uD4A5\u7204\uC316\uE59F = local; diff --git a/testdata/baselines/reference/submodule/compiler/didYouMeanSuggestionErrors.errors.txt b/testdata/baselines/reference/submodule/compiler/didYouMeanSuggestionErrors.errors.txt index c109c19fe7a..a51a1d701da 100644 --- a/testdata/baselines/reference/submodule/compiler/didYouMeanSuggestionErrors.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/didYouMeanSuggestionErrors.errors.txt @@ -1,14 +1,14 @@ -didYouMeanSuggestionErrors.ts(1,1): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. -didYouMeanSuggestionErrors.ts(2,5): error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. -didYouMeanSuggestionErrors.ts(3,19): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. -didYouMeanSuggestionErrors.ts(7,1): error TS2582: Cannot find name 'suite'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. -didYouMeanSuggestionErrors.ts(8,5): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +didYouMeanSuggestionErrors.ts(1,1): error TS2593: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. +didYouMeanSuggestionErrors.ts(2,5): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. +didYouMeanSuggestionErrors.ts(3,19): error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. +didYouMeanSuggestionErrors.ts(7,1): error TS2593: Cannot find name 'suite'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. +didYouMeanSuggestionErrors.ts(8,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. didYouMeanSuggestionErrors.ts(9,9): error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. -didYouMeanSuggestionErrors.ts(9,21): error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +didYouMeanSuggestionErrors.ts(9,21): error TS2591: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. didYouMeanSuggestionErrors.ts(10,9): error TS2584: Cannot find name 'document'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. -didYouMeanSuggestionErrors.ts(12,19): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -didYouMeanSuggestionErrors.ts(13,19): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -didYouMeanSuggestionErrors.ts(14,19): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +didYouMeanSuggestionErrors.ts(12,19): error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. +didYouMeanSuggestionErrors.ts(13,19): error TS2591: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. +didYouMeanSuggestionErrors.ts(14,19): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. didYouMeanSuggestionErrors.ts(16,23): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. didYouMeanSuggestionErrors.ts(17,23): error TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. didYouMeanSuggestionErrors.ts(18,23): error TS2583: Cannot find name 'WeakMap'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. @@ -22,40 +22,40 @@ didYouMeanSuggestionErrors.ts(24,18): error TS2583: Cannot find name 'AsyncItera ==== didYouMeanSuggestionErrors.ts (19 errors) ==== describe("my test suite", () => { ~~~~~~~~ -!!! error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +!!! error TS2593: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. it("should run", () => { ~~ -!!! error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +!!! error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. const a = $(".thing"); ~ -!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. +!!! error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. }); }); suite("another suite", () => { ~~~~~ -!!! error TS2582: Cannot find name 'suite'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +!!! error TS2593: Cannot find name 'suite'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. test("everything else", () => { ~~~~ -!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +!!! error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. console.log(process.env); ~~~~~~~ !!! error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. ~~~~~~~ -!!! error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. document.createElement("div"); ~~~~~~~~ !!! error TS2584: Cannot find name 'document'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. const x = require("fs"); ~~~~~~~ -!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. const y = Buffer.from([]); ~~~~~~ -!!! error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. const z = module.exports; ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. const a = new Map(); ~~~ diff --git a/testdata/baselines/reference/submodule/compiler/didYouMeanSuggestionErrors.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/didYouMeanSuggestionErrors.errors.txt.diff deleted file mode 100644 index c80005b4b7c..00000000000 --- a/testdata/baselines/reference/submodule/compiler/didYouMeanSuggestionErrors.errors.txt.diff +++ /dev/null @@ -1,76 +0,0 @@ ---- old.didYouMeanSuggestionErrors.errors.txt -+++ new.didYouMeanSuggestionErrors.errors.txt -@@= skipped -0, +0 lines =@@ --didYouMeanSuggestionErrors.ts(1,1): error TS2593: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. --didYouMeanSuggestionErrors.ts(2,5): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. --didYouMeanSuggestionErrors.ts(3,19): error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. --didYouMeanSuggestionErrors.ts(7,1): error TS2593: Cannot find name 'suite'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. --didYouMeanSuggestionErrors.ts(8,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -+didYouMeanSuggestionErrors.ts(1,1): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. -+didYouMeanSuggestionErrors.ts(2,5): error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. -+didYouMeanSuggestionErrors.ts(3,19): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. -+didYouMeanSuggestionErrors.ts(7,1): error TS2582: Cannot find name 'suite'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. -+didYouMeanSuggestionErrors.ts(8,5): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - didYouMeanSuggestionErrors.ts(9,9): error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. --didYouMeanSuggestionErrors.ts(9,21): error TS2591: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+didYouMeanSuggestionErrors.ts(9,21): error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - didYouMeanSuggestionErrors.ts(10,9): error TS2584: Cannot find name 'document'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. --didYouMeanSuggestionErrors.ts(12,19): error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. --didYouMeanSuggestionErrors.ts(13,19): error TS2591: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. --didYouMeanSuggestionErrors.ts(14,19): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+didYouMeanSuggestionErrors.ts(12,19): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -+didYouMeanSuggestionErrors.ts(13,19): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -+didYouMeanSuggestionErrors.ts(14,19): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - didYouMeanSuggestionErrors.ts(16,23): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. - didYouMeanSuggestionErrors.ts(17,23): error TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. - didYouMeanSuggestionErrors.ts(18,23): error TS2583: Cannot find name 'WeakMap'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. -@@= skipped -21, +21 lines =@@ - ==== didYouMeanSuggestionErrors.ts (19 errors) ==== - describe("my test suite", () => { - ~~~~~~~~ --!!! error TS2593: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -+!!! error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - it("should run", () => { - ~~ --!!! error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -+!!! error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - const a = $(".thing"); - ~ --!!! error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. -+!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - }); - }); - - suite("another suite", () => { - ~~~~~ --!!! error TS2593: Cannot find name 'suite'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -+!!! error TS2582: Cannot find name 'suite'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - test("everything else", () => { - ~~~~ --!!! error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -+!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - console.log(process.env); - ~~~~~~~ - !!! error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. - ~~~~~~~ --!!! error TS2591: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - document.createElement("div"); - ~~~~~~~~ - !!! error TS2584: Cannot find name 'document'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. - - const x = require("fs"); - ~~~~~~~ --!!! error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - const y = Buffer.from([]); - ~~~~~~ --!!! error TS2591: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - const z = module.exports; - ~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - - const a = new Map(); - ~~~ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/elidedJSImport1.errors.txt b/testdata/baselines/reference/submodule/compiler/elidedJSImport1.errors.txt index 0ceca64b81b..f5f8394fd94 100644 --- a/testdata/baselines/reference/submodule/compiler/elidedJSImport1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/elidedJSImport1.errors.txt @@ -1,4 +1,4 @@ -caller.js(1,21): error TS2307: Cannot find module 'fs' or its corresponding type declarations. +caller.js(1,21): error TS2591: Cannot find name 'fs'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. caller.js(2,8): error TS18042: 'TruffleContract' is a type and cannot be imported in JavaScript files. Use 'import("@truffle/contract").TruffleContract' in a JSDoc type annotation. caller.js(4,43): error TS2708: Cannot use namespace 'TruffleContract' as a value. caller.js(4,60): error TS2708: Cannot use namespace 'TruffleContract' as a value. @@ -7,7 +7,7 @@ caller.js(4,60): error TS2708: Cannot use namespace 'TruffleContract' as a value ==== caller.js (4 errors) ==== import * as fs from 'fs'; ~~~~ -!!! error TS2307: Cannot find module 'fs' or its corresponding type declarations. +!!! error TS2591: Cannot find name 'fs'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. import TruffleContract from '@truffle/contract'; // Runtime err: this import is elided in transform ~~~~~~~~~~~~~~~ !!! error TS18042: 'TruffleContract' is a type and cannot be imported in JavaScript files. Use 'import("@truffle/contract").TruffleContract' in a JSDoc type annotation. diff --git a/testdata/baselines/reference/submodule/compiler/elidedJSImport1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/elidedJSImport1.errors.txt.diff deleted file mode 100644 index 17a7386befa..00000000000 --- a/testdata/baselines/reference/submodule/compiler/elidedJSImport1.errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.elidedJSImport1.errors.txt -+++ new.elidedJSImport1.errors.txt -@@= skipped -0, +0 lines =@@ --caller.js(1,21): error TS2591: Cannot find name 'fs'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+caller.js(1,21): error TS2307: Cannot find module 'fs' or its corresponding type declarations. - caller.js(2,8): error TS18042: 'TruffleContract' is a type and cannot be imported in JavaScript files. Use 'import("@truffle/contract").TruffleContract' in a JSDoc type annotation. - caller.js(4,43): error TS2708: Cannot use namespace 'TruffleContract' as a value. - caller.js(4,60): error TS2708: Cannot use namespace 'TruffleContract' as a value. -@@= skipped -6, +6 lines =@@ - ==== caller.js (4 errors) ==== - import * as fs from 'fs'; - ~~~~ --!!! error TS2591: Cannot find name 'fs'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2307: Cannot find module 'fs' or its corresponding type declarations. - import TruffleContract from '@truffle/contract'; // Runtime err: this import is elided in transform - ~~~~~~~~~~~~~~~ - !!! error TS18042: 'TruffleContract' is a type and cannot be imported in JavaScript files. Use 'import("@truffle/contract").TruffleContract' in a JSDoc type annotation. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ensureNoCrashExportAssignmentDefineProperrtyPotentialMerge.errors.txt b/testdata/baselines/reference/submodule/compiler/ensureNoCrashExportAssignmentDefineProperrtyPotentialMerge.errors.txt index ccd73fdb244..6a7e54d2d55 100644 --- a/testdata/baselines/reference/submodule/compiler/ensureNoCrashExportAssignmentDefineProperrtyPotentialMerge.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/ensureNoCrashExportAssignmentDefineProperrtyPotentialMerge.errors.txt @@ -1,4 +1,4 @@ -index.js(3,23): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +index.js(3,23): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ==== index.js (1 errors) ==== @@ -6,7 +6,7 @@ index.js(3,23): error TS2580: Cannot find name 'module'. Do you need to install module.exports = 12; Object.defineProperty(module, "exports", { value: "oh no" }); ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ==== namespacey.js (0 errors) ==== const A = {} diff --git a/testdata/baselines/reference/submodule/compiler/ensureNoCrashExportAssignmentDefineProperrtyPotentialMerge.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/ensureNoCrashExportAssignmentDefineProperrtyPotentialMerge.errors.txt.diff index db3cbbf2cf7..1a85233adff 100644 --- a/testdata/baselines/reference/submodule/compiler/ensureNoCrashExportAssignmentDefineProperrtyPotentialMerge.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/ensureNoCrashExportAssignmentDefineProperrtyPotentialMerge.errors.txt.diff @@ -6,7 +6,7 @@ - - -==== index.js (0 errors) ==== -+index.js(3,23): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. ++index.js(3,23): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. + + +==== index.js (1 errors) ==== @@ -14,7 +14,7 @@ module.exports = 12; Object.defineProperty(module, "exports", { value: "oh no" }); + ~~~~~~ -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. ++!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ==== namespacey.js (0 errors) ==== const A = {} diff --git a/testdata/baselines/reference/submodule/compiler/externModule.errors.txt b/testdata/baselines/reference/submodule/compiler/externModule.errors.txt index 5d933216d1d..3a1ac80845b 100644 --- a/testdata/baselines/reference/submodule/compiler/externModule.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/externModule.errors.txt @@ -1,5 +1,5 @@ externModule.ts(1,1): error TS2304: Cannot find name 'declare'. -externModule.ts(1,9): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +externModule.ts(1,9): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. externModule.ts(1,16): error TS1437: Namespace must be given a name. externModule.ts(3,10): error TS2391: Function implementation is missing or not immediately following the declaration. externModule.ts(4,10): error TS2391: Function implementation is missing or not immediately following the declaration. @@ -18,7 +18,7 @@ externModule.ts(37,3): error TS2552: Cannot find name 'XDate'. Did you mean 'Dat ~~~~~~~ !!! error TS2304: Cannot find name 'declare'. ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ~ !!! error TS1437: Namespace must be given a name. export class XDate { diff --git a/testdata/baselines/reference/submodule/compiler/externModule.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/externModule.errors.txt.diff deleted file mode 100644 index 66ebfc41829..00000000000 --- a/testdata/baselines/reference/submodule/compiler/externModule.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.externModule.errors.txt -+++ new.externModule.errors.txt -@@= skipped -0, +0 lines =@@ - externModule.ts(1,1): error TS2304: Cannot find name 'declare'. --externModule.ts(1,9): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+externModule.ts(1,9): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - externModule.ts(1,16): error TS1437: Namespace must be given a name. - externModule.ts(3,10): error TS2391: Function implementation is missing or not immediately following the declaration. - externModule.ts(4,10): error TS2391: Function implementation is missing or not immediately following the declaration. -@@= skipped -17, +17 lines =@@ - ~~~~~~~ - !!! error TS2304: Cannot find name 'declare'. - ~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - ~ - !!! error TS1437: Namespace must be given a name. - export class XDate { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importAliasInModuleAugmentation.errors.txt b/testdata/baselines/reference/submodule/compiler/importAliasInModuleAugmentation.errors.txt index d8b96f63170..5e8a8c42b92 100644 --- a/testdata/baselines/reference/submodule/compiler/importAliasInModuleAugmentation.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/importAliasInModuleAugmentation.errors.txt @@ -1,5 +1,5 @@ importAliasInModuleAugmentation.ts(12,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. -importAliasInModuleAugmentation.ts(12,24): error TS2307: Cannot find module 'fs' or its corresponding type declarations. +importAliasInModuleAugmentation.ts(12,24): error TS2591: Cannot find name 'fs'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ==== importAliasInModuleAugmentation.ts (2 errors) ==== @@ -18,7 +18,7 @@ importAliasInModuleAugmentation.ts(12,24): error TS2307: Cannot find module 'fs' ~~~~~~ !!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. ~~~~ -!!! error TS2307: Cannot find module 'fs' or its corresponding type declarations. +!!! error TS2591: Cannot find name 'fs'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. } const m: number = x; diff --git a/testdata/baselines/reference/submodule/compiler/importAliasInModuleAugmentation.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/importAliasInModuleAugmentation.errors.txt.diff deleted file mode 100644 index 395064c6783..00000000000 --- a/testdata/baselines/reference/submodule/compiler/importAliasInModuleAugmentation.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.importAliasInModuleAugmentation.errors.txt -+++ new.importAliasInModuleAugmentation.errors.txt -@@= skipped -0, +0 lines =@@ - importAliasInModuleAugmentation.ts(12,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. --importAliasInModuleAugmentation.ts(12,24): error TS2591: Cannot find name 'fs'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+importAliasInModuleAugmentation.ts(12,24): error TS2307: Cannot find module 'fs' or its corresponding type declarations. - - - ==== importAliasInModuleAugmentation.ts (2 errors) ==== -@@= skipped -17, +17 lines =@@ - ~~~~~~ - !!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. - ~~~~ --!!! error TS2591: Cannot find name 'fs'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2307: Cannot find module 'fs' or its corresponding type declarations. - } - - const m: number = x; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importTypeWithUnparenthesizedGenericFunctionParsed.errors.txt b/testdata/baselines/reference/submodule/compiler/importTypeWithUnparenthesizedGenericFunctionParsed.errors.txt index 56390cdc52d..fddc165b4ca 100644 --- a/testdata/baselines/reference/submodule/compiler/importTypeWithUnparenthesizedGenericFunctionParsed.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/importTypeWithUnparenthesizedGenericFunctionParsed.errors.txt @@ -1,7 +1,7 @@ -importTypeWithUnparenthesizedGenericFunctionParsed.ts(1,36): error TS2307: Cannot find module 'module' or its corresponding type declarations. +importTypeWithUnparenthesizedGenericFunctionParsed.ts(1,36): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ==== importTypeWithUnparenthesizedGenericFunctionParsed.ts (1 errors) ==== export declare const fail1: import("module").Modifier<(x: T) => T>; // shouldn't be a parse error ~~~~~~~~ -!!! error TS2307: Cannot find module 'module' or its corresponding type declarations. \ No newline at end of file +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importTypeWithUnparenthesizedGenericFunctionParsed.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/importTypeWithUnparenthesizedGenericFunctionParsed.errors.txt.diff deleted file mode 100644 index 809aeb82d58..00000000000 --- a/testdata/baselines/reference/submodule/compiler/importTypeWithUnparenthesizedGenericFunctionParsed.errors.txt.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- old.importTypeWithUnparenthesizedGenericFunctionParsed.errors.txt -+++ new.importTypeWithUnparenthesizedGenericFunctionParsed.errors.txt -@@= skipped -0, +0 lines =@@ --importTypeWithUnparenthesizedGenericFunctionParsed.ts(1,36): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+importTypeWithUnparenthesizedGenericFunctionParsed.ts(1,36): error TS2307: Cannot find module 'module' or its corresponding type declarations. - - - ==== importTypeWithUnparenthesizedGenericFunctionParsed.ts (1 errors) ==== - export declare const fail1: import("module").Modifier<(x: T) => T>; // shouldn't be a parse error - ~~~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2307: Cannot find module 'module' or its corresponding type declarations. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/innerModExport1.errors.txt b/testdata/baselines/reference/submodule/compiler/innerModExport1.errors.txt index f300487ab97..d8a2bdc8ac8 100644 --- a/testdata/baselines/reference/submodule/compiler/innerModExport1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/innerModExport1.errors.txt @@ -1,4 +1,4 @@ -innerModExport1.ts(5,5): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +innerModExport1.ts(5,5): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. innerModExport1.ts(5,12): error TS1437: Namespace must be given a name. innerModExport1.ts(19,7): error TS2339: Property 'ExportFunc' does not exist on type 'typeof Outer'. @@ -10,7 +10,7 @@ innerModExport1.ts(19,7): error TS2339: Property 'ExportFunc' does not exist on var non_export_var: number; module { ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ~ !!! error TS1437: Namespace must be given a name. var non_export_var = 0; diff --git a/testdata/baselines/reference/submodule/compiler/innerModExport1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/innerModExport1.errors.txt.diff deleted file mode 100644 index dd92bbc6ee6..00000000000 --- a/testdata/baselines/reference/submodule/compiler/innerModExport1.errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.innerModExport1.errors.txt -+++ new.innerModExport1.errors.txt -@@= skipped -0, +0 lines =@@ --innerModExport1.ts(5,5): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+innerModExport1.ts(5,5): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - innerModExport1.ts(5,12): error TS1437: Namespace must be given a name. - innerModExport1.ts(19,7): error TS2339: Property 'ExportFunc' does not exist on type 'typeof Outer'. - -@@= skipped -9, +9 lines =@@ - var non_export_var: number; - module { - ~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - ~ - !!! error TS1437: Namespace must be given a name. - var non_export_var = 0; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/innerModExport2.errors.txt b/testdata/baselines/reference/submodule/compiler/innerModExport2.errors.txt index aaf593227c9..0984137f99a 100644 --- a/testdata/baselines/reference/submodule/compiler/innerModExport2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/innerModExport2.errors.txt @@ -1,4 +1,4 @@ -innerModExport2.ts(5,5): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +innerModExport2.ts(5,5): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. innerModExport2.ts(5,12): error TS1437: Namespace must be given a name. innerModExport2.ts(7,20): error TS2395: Individual declarations in merged declaration 'export_var' must be all exported or all local. innerModExport2.ts(13,9): error TS2395: Individual declarations in merged declaration 'export_var' must be all exported or all local. @@ -12,7 +12,7 @@ innerModExport2.ts(20,7): error TS2339: Property 'NonExportFunc' does not exist var non_export_var: number; module { ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ~ !!! error TS1437: Namespace must be given a name. var non_export_var = 0; diff --git a/testdata/baselines/reference/submodule/compiler/innerModExport2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/innerModExport2.errors.txt.diff deleted file mode 100644 index 6fcbc3554d1..00000000000 --- a/testdata/baselines/reference/submodule/compiler/innerModExport2.errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.innerModExport2.errors.txt -+++ new.innerModExport2.errors.txt -@@= skipped -0, +0 lines =@@ --innerModExport2.ts(5,5): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+innerModExport2.ts(5,5): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - innerModExport2.ts(5,12): error TS1437: Namespace must be given a name. - innerModExport2.ts(7,20): error TS2395: Individual declarations in merged declaration 'export_var' must be all exported or all local. - innerModExport2.ts(13,9): error TS2395: Individual declarations in merged declaration 'export_var' must be all exported or all local. -@@= skipped -11, +11 lines =@@ - var non_export_var: number; - module { - ~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - ~ - !!! error TS1437: Namespace must be given a name. - var non_export_var = 0; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesImportExportElision(target=es2015).errors.txt b/testdata/baselines/reference/submodule/compiler/isolatedModulesImportExportElision(target=es2015).errors.txt index 77a7a49f3d7..d2963ba565d 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesImportExportElision(target=es2015).errors.txt +++ b/testdata/baselines/reference/submodule/compiler/isolatedModulesImportExportElision(target=es2015).errors.txt @@ -1,19 +1,19 @@ -file1.ts(1,17): error TS2307: Cannot find module 'module' or its corresponding type declarations. -file1.ts(2,18): error TS2307: Cannot find module 'module' or its corresponding type declarations. -file1.ts(3,21): error TS2307: Cannot find module 'module' or its corresponding type declarations. -file1.ts(11,18): error TS2307: Cannot find module 'module' or its corresponding type declarations. +file1.ts(1,17): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. +file1.ts(2,18): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. +file1.ts(3,21): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. +file1.ts(11,18): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ==== file1.ts (4 errors) ==== import {c} from "module" ~~~~~~~~ -!!! error TS2307: Cannot find module 'module' or its corresponding type declarations. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. import {c2} from "module" ~~~~~~~~ -!!! error TS2307: Cannot find module 'module' or its corresponding type declarations. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. import * as ns from "module" ~~~~~~~~ -!!! error TS2307: Cannot find module 'module' or its corresponding type declarations. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. class C extends c2.C { } @@ -23,5 +23,5 @@ file1.ts(11,18): error TS2307: Cannot find module 'module' or its corresponding export {c1} from "module"; ~~~~~~~~ -!!! error TS2307: Cannot find module 'module' or its corresponding type declarations. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. export var z = x; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesImportExportElision(target=es2015).errors.txt.diff b/testdata/baselines/reference/submodule/compiler/isolatedModulesImportExportElision(target=es2015).errors.txt.diff deleted file mode 100644 index bf11b42d357..00000000000 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesImportExportElision(target=es2015).errors.txt.diff +++ /dev/null @@ -1,36 +0,0 @@ ---- old.isolatedModulesImportExportElision(target=es2015).errors.txt -+++ new.isolatedModulesImportExportElision(target=es2015).errors.txt -@@= skipped -0, +0 lines =@@ --file1.ts(1,17): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. --file1.ts(2,18): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. --file1.ts(3,21): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. --file1.ts(11,18): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+file1.ts(1,17): error TS2307: Cannot find module 'module' or its corresponding type declarations. -+file1.ts(2,18): error TS2307: Cannot find module 'module' or its corresponding type declarations. -+file1.ts(3,21): error TS2307: Cannot find module 'module' or its corresponding type declarations. -+file1.ts(11,18): error TS2307: Cannot find module 'module' or its corresponding type declarations. - - - ==== file1.ts (4 errors) ==== - import {c} from "module" - ~~~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2307: Cannot find module 'module' or its corresponding type declarations. - import {c2} from "module" - ~~~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2307: Cannot find module 'module' or its corresponding type declarations. - import * as ns from "module" - ~~~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2307: Cannot find module 'module' or its corresponding type declarations. - - class C extends c2.C { - } -@@= skipped -22, +22 lines =@@ - - export {c1} from "module"; - ~~~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2307: Cannot find module 'module' or its corresponding type declarations. - export var z = x; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/metadataImportType.errors.txt b/testdata/baselines/reference/submodule/compiler/metadataImportType.errors.txt index 3b229d7992a..7e49c9df952 100644 --- a/testdata/baselines/reference/submodule/compiler/metadataImportType.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/metadataImportType.errors.txt @@ -1,4 +1,4 @@ -metadataImportType.ts(2,6): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +metadataImportType.ts(2,6): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. metadataImportType.ts(3,15): error TS2307: Cannot find module './b' or its corresponding type declarations. @@ -6,7 +6,7 @@ metadataImportType.ts(3,15): error TS2307: Cannot find module './b' or its corre export class A { @test ~~~~ -!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +!!! error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. b: import('./b').B ~~~~~ !!! error TS2307: Cannot find module './b' or its corresponding type declarations. diff --git a/testdata/baselines/reference/submodule/compiler/metadataImportType.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/metadataImportType.errors.txt.diff deleted file mode 100644 index 846cce6fd82..00000000000 --- a/testdata/baselines/reference/submodule/compiler/metadataImportType.errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.metadataImportType.errors.txt -+++ new.metadataImportType.errors.txt -@@= skipped -0, +0 lines =@@ --metadataImportType.ts(2,6): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -+metadataImportType.ts(2,6): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - metadataImportType.ts(3,15): error TS2307: Cannot find module './b' or its corresponding type declarations. - - -@@= skipped -5, +5 lines =@@ - export class A { - @test - ~~~~ --!!! error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -+!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - b: import('./b').B - ~~~~~ - !!! error TS2307: Cannot find module './b' or its corresponding type declarations. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleExports1.errors.txt b/testdata/baselines/reference/submodule/compiler/moduleExports1.errors.txt index b64f9796076..d094faafdc9 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleExports1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/moduleExports1.errors.txt @@ -1,6 +1,6 @@ moduleExports1.ts(3,10): error TS2564: Property 'address' has no initializer and is not definitely assigned in the constructor. -moduleExports1.ts(13,6): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -moduleExports1.ts(13,22): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +moduleExports1.ts(13,6): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. +moduleExports1.ts(13,22): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ==== moduleExports1.ts (3 errors) ==== @@ -20,6 +20,6 @@ moduleExports1.ts(13,22): error TS2580: Cannot find name 'module'. Do you need t if (!module.exports) module.exports = ""; ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. \ No newline at end of file +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleExports1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleExports1.errors.txt.diff deleted file mode 100644 index 510d4555da5..00000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleExports1.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.moduleExports1.errors.txt -+++ new.moduleExports1.errors.txt -@@= skipped -0, +0 lines =@@ - moduleExports1.ts(3,10): error TS2564: Property 'address' has no initializer and is not definitely assigned in the constructor. --moduleExports1.ts(13,6): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. --moduleExports1.ts(13,22): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+moduleExports1.ts(13,6): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -+moduleExports1.ts(13,22): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - - - ==== moduleExports1.ts (3 errors) ==== -@@= skipped -19, +19 lines =@@ - - if (!module.exports) module.exports = ""; - ~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - ~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleKeywordRepeatError.errors.txt b/testdata/baselines/reference/submodule/compiler/moduleKeywordRepeatError.errors.txt index 4fa11a72639..6076da15131 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleKeywordRepeatError.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/moduleKeywordRepeatError.errors.txt @@ -1,4 +1,4 @@ -moduleKeywordRepeatError.ts(3,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +moduleKeywordRepeatError.ts(3,1): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. moduleKeywordRepeatError.ts(3,15): error TS1005: ';' expected. @@ -7,6 +7,6 @@ moduleKeywordRepeatError.ts(3,15): error TS1005: ';' expected. module.module { } ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ~ !!! error TS1005: ';' expected. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleKeywordRepeatError.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleKeywordRepeatError.errors.txt.diff deleted file mode 100644 index 26b12fc6259..00000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleKeywordRepeatError.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.moduleKeywordRepeatError.errors.txt -+++ new.moduleKeywordRepeatError.errors.txt -@@= skipped -0, +0 lines =@@ --moduleKeywordRepeatError.ts(3,1): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+moduleKeywordRepeatError.ts(3,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - moduleKeywordRepeatError.ts(3,15): error TS1005: ';' expected. - - -@@= skipped -6, +6 lines =@@ - - module.module { } - ~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - ~ - !!! error TS1005: ';' expected. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/modulePreserve3.trace.json b/testdata/baselines/reference/submodule/compiler/modulePreserve3.trace.json index d730dd7f5e0..9c1dafca93d 100644 --- a/testdata/baselines/reference/submodule/compiler/modulePreserve3.trace.json +++ b/testdata/baselines/reference/submodule/compiler/modulePreserve3.trace.json @@ -8,17 +8,3 @@ File '/node_modules/@types/react/package.json' does not exist. File '/node_modules/@types/react/jsx-runtime.d.ts' exists - use it as a name resolution result. Resolving real path for '/node_modules/@types/react/jsx-runtime.d.ts', result '/node_modules/@types/react/jsx-runtime.d.ts'. ======== Module name 'react/jsx-runtime' was successfully resolved to '/node_modules/@types/react/jsx-runtime.d.ts'. ======== -======== Resolving type reference directive 'react', containing file '/.src/__inferred type names__.ts', root directory '/.src/node_modules/@types,/node_modules/@types'. ======== -Resolving with primary search path '/.src/node_modules/@types, /node_modules/@types'. -Directory '/.src/node_modules/@types' does not exist, skipping all lookups in it. -File '/node_modules/@types/react/package.json' does not exist according to earlier cached lookups. -File '/node_modules/@types/react/index.d.ts' does not exist. -Looking up in 'node_modules' folder, initial location '/.src'. -Searching all ancestor node_modules directories for preferred extensions: Declaration. -Directory '/.src/node_modules' does not exist, skipping all lookups in it. -Directory '/.src/node_modules/@types' does not exist, skipping all lookups in it. -File '/node_modules/react.d.ts' does not exist. -File '/node_modules/@types/react/package.json' does not exist according to earlier cached lookups. -File '/node_modules/@types/react.d.ts' does not exist. -File '/node_modules/@types/react/index.d.ts' does not exist according to earlier cached lookups. -======== Type reference directive 'react' was not resolved. ======== diff --git a/testdata/baselines/reference/submodule/compiler/modulePreserve4.errors.txt b/testdata/baselines/reference/submodule/compiler/modulePreserve4.errors.txt index 2a64d7ccfa0..36ac9d5916d 100644 --- a/testdata/baselines/reference/submodule/compiler/modulePreserve4.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/modulePreserve4.errors.txt @@ -1,9 +1,9 @@ /f.cts(1,1): error TS1286: ECMAScript imports and exports cannot be written in a CommonJS file under 'verbatimModuleSyntax'. -/main1.ts(3,12): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +/main1.ts(3,12): error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. /main1.ts(19,4): error TS2339: Property 'default' does not exist on type '() => void'. /main1.ts(23,8): error TS1192: Module '"/e"' has no default export. /main2.mts(4,4): error TS2339: Property 'default' does not exist on type 'typeof import("/a")'. -/main2.mts(5,12): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +/main2.mts(5,12): error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. /main2.mts(14,8): error TS1192: Module '"/e"' has no default export. /main3.cjs(1,10): error TS1293: ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'. /main3.cjs(1,13): error TS1293: ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'. @@ -47,7 +47,7 @@ import a1 = require("./a"); // { x: 0 } const a2 = require("./a"); // Error in TS ~~~~~~~ -!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. const a3 = await import("./a"); // { x: 0 } a3.x; @@ -91,7 +91,7 @@ !!! error TS2339: Property 'default' does not exist on type 'typeof import("/a")'. const a2 = require("./a"); // Error in TS ~~~~~~~ -!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. import b1 from "./b"; // 0 import b2 = require("./b"); // { default: 0 } diff --git a/testdata/baselines/reference/submodule/compiler/modulePreserve4.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/modulePreserve4.errors.txt.diff index 43eac7e70a2..e00ac3e8454 100644 --- a/testdata/baselines/reference/submodule/compiler/modulePreserve4.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/modulePreserve4.errors.txt.diff @@ -4,14 +4,12 @@ -/a.js(2,1): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. /f.cts(1,1): error TS1286: ECMAScript imports and exports cannot be written in a CommonJS file under 'verbatimModuleSyntax'. -/main1.ts(1,13): error TS2305: Module '"./a"' has no exported member 'y'. --/main1.ts(3,12): error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+/main1.ts(3,12): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. + /main1.ts(3,12): error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. /main1.ts(19,4): error TS2339: Property 'default' does not exist on type '() => void'. /main1.ts(23,8): error TS1192: Module '"/e"' has no default export. -/main2.mts(1,13): error TS2305: Module '"./a"' has no exported member 'y'. /main2.mts(4,4): error TS2339: Property 'default' does not exist on type 'typeof import("/a")'. --/main2.mts(5,12): error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+/main2.mts(5,12): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. + /main2.mts(5,12): error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. /main2.mts(14,8): error TS1192: Module '"/e"' has no default export. /main3.cjs(1,10): error TS1293: ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'. -/main3.cjs(1,13): error TS2305: Module '"./a"' has no exported member 'y'. @@ -44,11 +42,6 @@ import a1 = require("./a"); // { x: 0 } const a2 = require("./a"); // Error in TS ~~~~~~~ --!!! error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - const a3 = await import("./a"); // { x: 0 } - a3.x; - @@= skipped -42, +40 lines =@@ import g2 = require("./g"); // { default: 0 } g2.default; @@ -61,16 +54,7 @@ import a1 = require("./a"); // { x: 0 } a1.x; a1.default.x; // Arguably should exist but doesn't -@@= skipped -11, +9 lines =@@ - !!! error TS2339: Property 'default' does not exist on type 'typeof import("/a")'. - const a2 = require("./a"); // Error in TS - ~~~~~~~ --!!! error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - - import b1 from "./b"; // 0 - import b2 = require("./b"); // { default: 0 } -@@= skipped -24, +24 lines =@@ +@@= skipped -35, +33 lines =@@ ~ !!! error TS1293: ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'. ~ diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolution_automaticTypeDirectiveNames.errors.txt b/testdata/baselines/reference/submodule/compiler/moduleResolution_automaticTypeDirectiveNames.errors.txt deleted file mode 100644 index d29804366ce..00000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleResolution_automaticTypeDirectiveNames.errors.txt +++ /dev/null @@ -1,14 +0,0 @@ -/a.ts(1,1): error TS2304: Cannot find name 'a'. - - -==== /a.ts (1 errors) ==== - a; - ~ -!!! error TS2304: Cannot find name 'a'. - -==== /node_modules/@types/.a/index.d.ts (0 errors) ==== - declare const a: number; - -==== /node_modules/@types/a/index.d.ts (0 errors) ==== - declare const a: string; - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolution_automaticTypeDirectiveNames.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleResolution_automaticTypeDirectiveNames.errors.txt.diff deleted file mode 100644 index 0261e827eb5..00000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleResolution_automaticTypeDirectiveNames.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.moduleResolution_automaticTypeDirectiveNames.errors.txt -+++ new.moduleResolution_automaticTypeDirectiveNames.errors.txt -@@= skipped -0, +0 lines =@@ -- -+/a.ts(1,1): error TS2304: Cannot find name 'a'. -+ -+ -+==== /a.ts (1 errors) ==== -+ a; -+ ~ -+!!! error TS2304: Cannot find name 'a'. -+ -+==== /node_modules/@types/.a/index.d.ts (0 errors) ==== -+ declare const a: number; -+ -+==== /node_modules/@types/a/index.d.ts (0 errors) ==== -+ declare const a: string; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolution_automaticTypeDirectiveNames.symbols b/testdata/baselines/reference/submodule/compiler/moduleResolution_automaticTypeDirectiveNames.symbols index 50662169878..43dc30b3cd8 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleResolution_automaticTypeDirectiveNames.symbols +++ b/testdata/baselines/reference/submodule/compiler/moduleResolution_automaticTypeDirectiveNames.symbols @@ -1,6 +1,10 @@ //// [tests/cases/compiler/moduleResolution_automaticTypeDirectiveNames.ts] //// === /a.ts === - a; +>a : Symbol(a, Decl(index.d.ts, 0, 13)) + +=== /node_modules/@types/a/index.d.ts === +declare const a: string; +>a : Symbol(a, Decl(index.d.ts, 0, 13)) diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolution_automaticTypeDirectiveNames.symbols.diff b/testdata/baselines/reference/submodule/compiler/moduleResolution_automaticTypeDirectiveNames.symbols.diff deleted file mode 100644 index 577a3eb1b4d..00000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleResolution_automaticTypeDirectiveNames.symbols.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- old.moduleResolution_automaticTypeDirectiveNames.symbols -+++ new.moduleResolution_automaticTypeDirectiveNames.symbols -@@= skipped -0, +0 lines =@@ - //// [tests/cases/compiler/moduleResolution_automaticTypeDirectiveNames.ts] //// - - === /a.ts === --a; -->a : Symbol(a, Decl(index.d.ts, 0, 13)) - --=== /node_modules/@types/a/index.d.ts === --declare const a: string; -->a : Symbol(a, Decl(index.d.ts, 0, 13)) -+a; diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolution_automaticTypeDirectiveNames.types b/testdata/baselines/reference/submodule/compiler/moduleResolution_automaticTypeDirectiveNames.types index 19fc4b6dce6..b9281401586 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleResolution_automaticTypeDirectiveNames.types +++ b/testdata/baselines/reference/submodule/compiler/moduleResolution_automaticTypeDirectiveNames.types @@ -2,5 +2,9 @@ === /a.ts === a; ->a : any +>a : string + +=== /node_modules/@types/a/index.d.ts === +declare const a: string; +>a : string diff --git a/testdata/baselines/reference/submodule/compiler/moduleResolution_automaticTypeDirectiveNames.types.diff b/testdata/baselines/reference/submodule/compiler/moduleResolution_automaticTypeDirectiveNames.types.diff deleted file mode 100644 index 13c397edcb7..00000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleResolution_automaticTypeDirectiveNames.types.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- old.moduleResolution_automaticTypeDirectiveNames.types -+++ new.moduleResolution_automaticTypeDirectiveNames.types -@@= skipped -1, +1 lines =@@ - - === /a.ts === - a; -->a : string -- --=== /node_modules/@types/a/index.d.ts === --declare const a: string; -->a : string -+>a : any diff --git a/testdata/baselines/reference/submodule/compiler/overloadingStaticFunctionsInFunctions.errors.txt b/testdata/baselines/reference/submodule/compiler/overloadingStaticFunctionsInFunctions.errors.txt index 0480862a9fa..04f5d04cf14 100644 --- a/testdata/baselines/reference/submodule/compiler/overloadingStaticFunctionsInFunctions.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/overloadingStaticFunctionsInFunctions.errors.txt @@ -1,13 +1,13 @@ overloadingStaticFunctionsInFunctions.ts(1,14): error TS1005: '(' expected. overloadingStaticFunctionsInFunctions.ts(2,3): error TS1128: Declaration or statement expected. -overloadingStaticFunctionsInFunctions.ts(2,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +overloadingStaticFunctionsInFunctions.ts(2,10): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. overloadingStaticFunctionsInFunctions.ts(3,3): error TS1128: Declaration or statement expected. -overloadingStaticFunctionsInFunctions.ts(3,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +overloadingStaticFunctionsInFunctions.ts(3,10): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. overloadingStaticFunctionsInFunctions.ts(3,15): error TS2304: Cannot find name 'name'. overloadingStaticFunctionsInFunctions.ts(3,19): error TS1005: ',' expected. overloadingStaticFunctionsInFunctions.ts(3,20): error TS2693: 'string' only refers to a type, but is being used as a value here. overloadingStaticFunctionsInFunctions.ts(4,3): error TS1128: Declaration or statement expected. -overloadingStaticFunctionsInFunctions.ts(4,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +overloadingStaticFunctionsInFunctions.ts(4,10): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. overloadingStaticFunctionsInFunctions.ts(4,15): error TS2304: Cannot find name 'name'. overloadingStaticFunctionsInFunctions.ts(4,20): error TS1109: Expression expected. overloadingStaticFunctionsInFunctions.ts(4,21): error TS2693: 'any' only refers to a type, but is being used as a value here. @@ -22,12 +22,12 @@ overloadingStaticFunctionsInFunctions.ts(4,25): error TS1005: ';' expected. ~~~~~~ !!! error TS1128: Declaration or statement expected. ~~~~ -!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +!!! error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. static test(name:string) ~~~~~~ !!! error TS1128: Declaration or statement expected. ~~~~ -!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +!!! error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. ~~~~ !!! error TS2304: Cannot find name 'name'. ~ @@ -38,7 +38,7 @@ overloadingStaticFunctionsInFunctions.ts(4,25): error TS1005: ';' expected. ~~~~~~ !!! error TS1128: Declaration or statement expected. ~~~~ -!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +!!! error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. ~~~~ !!! error TS2304: Cannot find name 'name'. ~ diff --git a/testdata/baselines/reference/submodule/compiler/overloadingStaticFunctionsInFunctions.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/overloadingStaticFunctionsInFunctions.errors.txt.diff deleted file mode 100644 index 924bd98b212..00000000000 --- a/testdata/baselines/reference/submodule/compiler/overloadingStaticFunctionsInFunctions.errors.txt.diff +++ /dev/null @@ -1,43 +0,0 @@ ---- old.overloadingStaticFunctionsInFunctions.errors.txt -+++ new.overloadingStaticFunctionsInFunctions.errors.txt -@@= skipped -0, +0 lines =@@ - overloadingStaticFunctionsInFunctions.ts(1,14): error TS1005: '(' expected. - overloadingStaticFunctionsInFunctions.ts(2,3): error TS1128: Declaration or statement expected. --overloadingStaticFunctionsInFunctions.ts(2,10): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -+overloadingStaticFunctionsInFunctions.ts(2,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - overloadingStaticFunctionsInFunctions.ts(3,3): error TS1128: Declaration or statement expected. --overloadingStaticFunctionsInFunctions.ts(3,10): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -+overloadingStaticFunctionsInFunctions.ts(3,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - overloadingStaticFunctionsInFunctions.ts(3,15): error TS2304: Cannot find name 'name'. - overloadingStaticFunctionsInFunctions.ts(3,19): error TS1005: ',' expected. - overloadingStaticFunctionsInFunctions.ts(3,20): error TS2693: 'string' only refers to a type, but is being used as a value here. - overloadingStaticFunctionsInFunctions.ts(4,3): error TS1128: Declaration or statement expected. --overloadingStaticFunctionsInFunctions.ts(4,10): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -+overloadingStaticFunctionsInFunctions.ts(4,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - overloadingStaticFunctionsInFunctions.ts(4,15): error TS2304: Cannot find name 'name'. - overloadingStaticFunctionsInFunctions.ts(4,20): error TS1109: Expression expected. - overloadingStaticFunctionsInFunctions.ts(4,21): error TS2693: 'any' only refers to a type, but is being used as a value here. -@@= skipped -21, +21 lines =@@ - ~~~~~~ - !!! error TS1128: Declaration or statement expected. - ~~~~ --!!! error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -+!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - static test(name:string) - ~~~~~~ - !!! error TS1128: Declaration or statement expected. - ~~~~ --!!! error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -+!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - ~~~~ - !!! error TS2304: Cannot find name 'name'. - ~ -@@= skipped -16, +16 lines =@@ - ~~~~~~ - !!! error TS1128: Declaration or statement expected. - ~~~~ --!!! error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -+!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - ~~~~ - !!! error TS2304: Cannot find name 'name'. - ~ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/reactJsxReactResolvedNodeNext.trace.json b/testdata/baselines/reference/submodule/compiler/reactJsxReactResolvedNodeNext.trace.json index 9635b88549e..4d90132ff25 100644 --- a/testdata/baselines/reference/submodule/compiler/reactJsxReactResolvedNodeNext.trace.json +++ b/testdata/baselines/reference/submodule/compiler/reactJsxReactResolvedNodeNext.trace.json @@ -31,12 +31,3 @@ File '/.src/node_modules/@types/react/package.json' exists according to earlier 'package.json' has 'types' field 'index.d.ts' that references '/.src/node_modules/@types/react/index.d.ts'. File '/.src/node_modules/@types/react/index.d.ts' exists - use it as a name resolution result. ======== Module name './' was successfully resolved to '/.src/node_modules/@types/react/index.d.ts'. ======== -======== Resolving type reference directive 'react', containing file '/.src/__inferred type names__.ts', root directory '/.src/node_modules/@types,/node_modules/@types'. ======== -Resolving with primary search path '/.src/node_modules/@types, /node_modules/@types'. -File '/.src/node_modules/@types/react/package.json' exists according to earlier cached lookups. -'package.json' does not have a 'typesVersions' field. -'package.json' does not have a 'typings' field. -'package.json' has 'types' field 'index.d.ts' that references '/.src/node_modules/@types/react/index.d.ts'. -File '/.src/node_modules/@types/react/index.d.ts' exists - use it as a name resolution result. -Resolving real path for '/.src/node_modules/@types/react/index.d.ts', result '/.src/node_modules/@types/react/index.d.ts'. -======== Type reference directive 'react' was successfully resolved to '/.src/node_modules/@types/react/index.d.ts', primary: true. ======== diff --git a/testdata/baselines/reference/submodule/compiler/reactJsxReactResolvedNodeNextEsm.trace.json b/testdata/baselines/reference/submodule/compiler/reactJsxReactResolvedNodeNextEsm.trace.json index 2d00b3c69f9..cb0492e3c4f 100644 --- a/testdata/baselines/reference/submodule/compiler/reactJsxReactResolvedNodeNextEsm.trace.json +++ b/testdata/baselines/reference/submodule/compiler/reactJsxReactResolvedNodeNextEsm.trace.json @@ -31,12 +31,3 @@ File '/.src/node_modules/@types/react/package.json' exists according to earlier 'package.json' has 'types' field 'index.d.ts' that references '/.src/node_modules/@types/react/index.d.ts'. File '/.src/node_modules/@types/react/index.d.ts' exists - use it as a name resolution result. ======== Module name './' was successfully resolved to '/.src/node_modules/@types/react/index.d.ts'. ======== -======== Resolving type reference directive 'react', containing file '/.src/__inferred type names__.ts', root directory '/.src/node_modules/@types,/node_modules/@types'. ======== -Resolving with primary search path '/.src/node_modules/@types, /node_modules/@types'. -File '/.src/node_modules/@types/react/package.json' exists according to earlier cached lookups. -'package.json' does not have a 'typesVersions' field. -'package.json' does not have a 'typings' field. -'package.json' has 'types' field 'index.d.ts' that references '/.src/node_modules/@types/react/index.d.ts'. -File '/.src/node_modules/@types/react/index.d.ts' exists - use it as a name resolution result. -Resolving real path for '/.src/node_modules/@types/react/index.d.ts', result '/.src/node_modules/@types/react/index.d.ts'. -======== Type reference directive 'react' was successfully resolved to '/.src/node_modules/@types/react/index.d.ts', primary: true. ======== diff --git a/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.errors.txt b/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.errors.txt deleted file mode 100644 index 206f1d2fc63..00000000000 --- a/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.errors.txt +++ /dev/null @@ -1,14 +0,0 @@ -usage.ts(1,23): error TS2307: Cannot find module 'url' or its corresponding type declarations. - - -==== usage.ts (1 errors) ==== - import { parse } from "url"; - ~~~~~ -!!! error TS2307: Cannot find module 'url' or its corresponding type declarations. - export const thing = () => parse(); - -==== node_modules/@types/node/index.d.ts (0 errors) ==== - declare module "url" { - export class Url {} - export function parse(): Url; - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.errors.txt.diff deleted file mode 100644 index fb8bf5ea05a..00000000000 --- a/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.referenceTypesPreferedToPathIfPossible.errors.txt -+++ new.referenceTypesPreferedToPathIfPossible.errors.txt -@@= skipped -0, +0 lines =@@ -- -+usage.ts(1,23): error TS2307: Cannot find module 'url' or its corresponding type declarations. -+ -+ -+==== usage.ts (1 errors) ==== -+ import { parse } from "url"; -+ ~~~~~ -+!!! error TS2307: Cannot find module 'url' or its corresponding type declarations. -+ export const thing = () => parse(); -+ -+==== node_modules/@types/node/index.d.ts (0 errors) ==== -+ declare module "url" { -+ export class Url {} -+ export function parse(): Url; -+ } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.js b/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.js index ae33767f582..45f692eabd0 100644 --- a/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.js +++ b/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.js @@ -20,4 +20,4 @@ exports.thing = thing; //// [usage.d.ts] -export declare const thing: () => any; +export declare const thing: () => import("url").Url; diff --git a/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.js.diff b/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.js.diff deleted file mode 100644 index 610ed981efb..00000000000 --- a/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.js.diff +++ /dev/null @@ -1,8 +0,0 @@ ---- old.referenceTypesPreferedToPathIfPossible.js -+++ new.referenceTypesPreferedToPathIfPossible.js -@@= skipped -19, +19 lines =@@ - - - //// [usage.d.ts] --export declare const thing: () => import("url").Url; -+export declare const thing: () => any; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.symbols b/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.symbols index 773b08850aa..97521d6d025 100644 --- a/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.symbols +++ b/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.symbols @@ -8,3 +8,14 @@ export const thing = () => parse(); >thing : Symbol(thing, Decl(usage.ts, 1, 12)) >parse : Symbol(parse, Decl(usage.ts, 0, 8)) +=== node_modules/@types/node/index.d.ts === +declare module "url" { +>"url" : Symbol("url", Decl(index.d.ts, 0, 0)) + + export class Url {} +>Url : Symbol(Url, Decl(index.d.ts, 0, 22)) + + export function parse(): Url; +>parse : Symbol(parse, Decl(index.d.ts, 1, 23)) +>Url : Symbol(Url, Decl(index.d.ts, 0, 22)) +} diff --git a/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.symbols.diff b/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.symbols.diff deleted file mode 100644 index cb2fa80ab12..00000000000 --- a/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.symbols.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.referenceTypesPreferedToPathIfPossible.symbols -+++ new.referenceTypesPreferedToPathIfPossible.symbols -@@= skipped -7, +7 lines =@@ - >thing : Symbol(thing, Decl(usage.ts, 1, 12)) - >parse : Symbol(parse, Decl(usage.ts, 0, 8)) - --=== node_modules/@types/node/index.d.ts === --declare module "url" { -->"url" : Symbol("url", Decl(index.d.ts, 0, 0)) -- -- export class Url {} -->Url : Symbol(Url, Decl(index.d.ts, 0, 22)) -- -- export function parse(): Url; -->parse : Symbol(parse, Decl(index.d.ts, 1, 23)) -->Url : Symbol(Url, Decl(index.d.ts, 0, 22)) --} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.types b/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.types index edaa9cfa8d6..f8d15810c36 100644 --- a/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.types +++ b/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.types @@ -2,11 +2,21 @@ === usage.ts === import { parse } from "url"; ->parse : any +>parse : () => import("url").Url export const thing = () => parse(); ->thing : () => any ->() => parse() : () => any ->parse() : any ->parse : any +>thing : () => import("url").Url +>() => parse() : () => import("url").Url +>parse() : import("url").Url +>parse : () => import("url").Url +=== node_modules/@types/node/index.d.ts === +declare module "url" { +>"url" : typeof import("url") + + export class Url {} +>Url : Url + + export function parse(): Url; +>parse : () => Url +} diff --git a/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.types.diff b/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.types.diff deleted file mode 100644 index ad7d0416977..00000000000 --- a/testdata/baselines/reference/submodule/compiler/referenceTypesPreferedToPathIfPossible.types.diff +++ /dev/null @@ -1,30 +0,0 @@ ---- old.referenceTypesPreferedToPathIfPossible.types -+++ new.referenceTypesPreferedToPathIfPossible.types -@@= skipped -1, +1 lines =@@ - - === usage.ts === - import { parse } from "url"; -->parse : () => import("url").Url -+>parse : any - - export const thing = () => parse(); -->thing : () => import("url").Url -->() => parse() : () => import("url").Url -->parse() : import("url").Url -->parse : () => import("url").Url -- --=== node_modules/@types/node/index.d.ts === --declare module "url" { -->"url" : typeof import("url") -- -- export class Url {} -->Url : Url -- -- export function parse(): Url; -->parse : () => Url --} -+>thing : () => any -+>() => parse() : () => any -+>parse() : any -+>parse : any -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/reservedWords2.errors.txt b/testdata/baselines/reference/submodule/compiler/reservedWords2.errors.txt index 8043dbf5f86..6605e82f0ab 100644 --- a/testdata/baselines/reference/submodule/compiler/reservedWords2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/reservedWords2.errors.txt @@ -1,6 +1,6 @@ reservedWords2.ts(1,8): error TS1109: Expression expected. reservedWords2.ts(1,14): error TS1005: '(' expected. -reservedWords2.ts(1,16): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +reservedWords2.ts(1,16): error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. reservedWords2.ts(1,31): error TS1005: ')' expected. reservedWords2.ts(2,12): error TS2300: Duplicate identifier '(Missing)'. reservedWords2.ts(2,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. @@ -45,7 +45,7 @@ reservedWords2.ts(12,19): error TS7006: Parameter 'string' implicitly has an 'an ~ !!! error TS1005: '(' expected. ~~~~~~~ -!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ~ !!! error TS1005: ')' expected. import * as while from "foo" diff --git a/testdata/baselines/reference/submodule/compiler/reservedWords2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/reservedWords2.errors.txt.diff deleted file mode 100644 index edf26ae32ff..00000000000 --- a/testdata/baselines/reference/submodule/compiler/reservedWords2.errors.txt.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.reservedWords2.errors.txt -+++ new.reservedWords2.errors.txt -@@= skipped -0, +0 lines =@@ - reservedWords2.ts(1,8): error TS1109: Expression expected. - reservedWords2.ts(1,14): error TS1005: '(' expected. --reservedWords2.ts(1,16): error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+reservedWords2.ts(1,16): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - reservedWords2.ts(1,31): error TS1005: ')' expected. - reservedWords2.ts(2,12): error TS2300: Duplicate identifier '(Missing)'. - reservedWords2.ts(2,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -@@= skipped -44, +44 lines =@@ - ~ - !!! error TS1005: '(' expected. - ~~~~~~~ --!!! error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - ~ - !!! error TS1005: ')' expected. - import * as while from "foo" \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/staticsInAFunction.errors.txt b/testdata/baselines/reference/submodule/compiler/staticsInAFunction.errors.txt index f7555f7aebe..98f5ecc7c21 100644 --- a/testdata/baselines/reference/submodule/compiler/staticsInAFunction.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/staticsInAFunction.errors.txt @@ -1,13 +1,13 @@ staticsInAFunction.ts(1,13): error TS1005: '(' expected. staticsInAFunction.ts(2,4): error TS1128: Declaration or statement expected. -staticsInAFunction.ts(2,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +staticsInAFunction.ts(2,11): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. staticsInAFunction.ts(3,4): error TS1128: Declaration or statement expected. -staticsInAFunction.ts(3,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +staticsInAFunction.ts(3,11): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. staticsInAFunction.ts(3,16): error TS2304: Cannot find name 'name'. staticsInAFunction.ts(3,20): error TS1005: ',' expected. staticsInAFunction.ts(3,21): error TS2693: 'string' only refers to a type, but is being used as a value here. staticsInAFunction.ts(4,4): error TS1128: Declaration or statement expected. -staticsInAFunction.ts(4,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +staticsInAFunction.ts(4,11): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. staticsInAFunction.ts(4,16): error TS2304: Cannot find name 'name'. staticsInAFunction.ts(4,21): error TS1109: Expression expected. staticsInAFunction.ts(4,22): error TS2693: 'any' only refers to a type, but is being used as a value here. @@ -22,12 +22,12 @@ staticsInAFunction.ts(4,26): error TS1005: ';' expected. ~~~~~~ !!! error TS1128: Declaration or statement expected. ~~~~ -!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +!!! error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. static test(name:string) ~~~~~~ !!! error TS1128: Declaration or statement expected. ~~~~ -!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +!!! error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. ~~~~ !!! error TS2304: Cannot find name 'name'. ~ @@ -38,7 +38,7 @@ staticsInAFunction.ts(4,26): error TS1005: ';' expected. ~~~~~~ !!! error TS1128: Declaration or statement expected. ~~~~ -!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +!!! error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. ~~~~ !!! error TS2304: Cannot find name 'name'. ~ diff --git a/testdata/baselines/reference/submodule/compiler/staticsInAFunction.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/staticsInAFunction.errors.txt.diff deleted file mode 100644 index eb907b7ca23..00000000000 --- a/testdata/baselines/reference/submodule/compiler/staticsInAFunction.errors.txt.diff +++ /dev/null @@ -1,43 +0,0 @@ ---- old.staticsInAFunction.errors.txt -+++ new.staticsInAFunction.errors.txt -@@= skipped -0, +0 lines =@@ - staticsInAFunction.ts(1,13): error TS1005: '(' expected. - staticsInAFunction.ts(2,4): error TS1128: Declaration or statement expected. --staticsInAFunction.ts(2,11): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -+staticsInAFunction.ts(2,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - staticsInAFunction.ts(3,4): error TS1128: Declaration or statement expected. --staticsInAFunction.ts(3,11): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -+staticsInAFunction.ts(3,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - staticsInAFunction.ts(3,16): error TS2304: Cannot find name 'name'. - staticsInAFunction.ts(3,20): error TS1005: ',' expected. - staticsInAFunction.ts(3,21): error TS2693: 'string' only refers to a type, but is being used as a value here. - staticsInAFunction.ts(4,4): error TS1128: Declaration or statement expected. --staticsInAFunction.ts(4,11): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -+staticsInAFunction.ts(4,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - staticsInAFunction.ts(4,16): error TS2304: Cannot find name 'name'. - staticsInAFunction.ts(4,21): error TS1109: Expression expected. - staticsInAFunction.ts(4,22): error TS2693: 'any' only refers to a type, but is being used as a value here. -@@= skipped -21, +21 lines =@@ - ~~~~~~ - !!! error TS1128: Declaration or statement expected. - ~~~~ --!!! error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -+!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - static test(name:string) - ~~~~~~ - !!! error TS1128: Declaration or statement expected. - ~~~~ --!!! error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -+!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - ~~~~ - !!! error TS2304: Cannot find name 'name'. - ~ -@@= skipped -16, +16 lines =@@ - ~~~~~~ - !!! error TS1128: Declaration or statement expected. - ~~~~ --!!! error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. -+!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - ~~~~ - !!! error TS2304: Cannot find name 'name'. - ~ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/truthinessCallExpressionCoercion4.errors.txt b/testdata/baselines/reference/submodule/compiler/truthinessCallExpressionCoercion4.errors.txt index 625326c7df9..d32c4be1f24 100644 --- a/testdata/baselines/reference/submodule/compiler/truthinessCallExpressionCoercion4.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/truthinessCallExpressionCoercion4.errors.txt @@ -1,4 +1,4 @@ -a.js(3,12): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +a.js(3,12): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ==== a.js (1 errors) ==== @@ -6,7 +6,7 @@ a.js(3,12): error TS2580: Cannot find name 'module'. Do you need to install type if (typeof module === 'object' && module.exports) { ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. module.exports = fn; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/truthinessCallExpressionCoercion4.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/truthinessCallExpressionCoercion4.errors.txt.diff index 6a48cc76e76..8648b8aacff 100644 --- a/testdata/baselines/reference/submodule/compiler/truthinessCallExpressionCoercion4.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/truthinessCallExpressionCoercion4.errors.txt.diff @@ -2,7 +2,7 @@ +++ new.truthinessCallExpressionCoercion4.errors.txt @@= skipped -0, +0 lines =@@ - -+a.js(3,12): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. ++a.js(3,12): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. + + +==== a.js (1 errors) ==== @@ -10,7 +10,7 @@ + + if (typeof module === 'object' && module.exports) { + ~~~~~~ -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. ++!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. + module.exports = fn; + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.errors.txt b/testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.errors.txt new file mode 100644 index 00000000000..b304241b483 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.errors.txt @@ -0,0 +1,27 @@ +foo.tsx(2,10): error TS2305: Module '"a"' has no exported member 'Test'. + + +==== foo.tsx (1 errors) ==== + /// + import { Test } from 'a'; + ~~~~ +!!! error TS2305: Module '"a"' has no exported member 'Test'. + const Foo = (

); + +==== /node_modules/@types/a/index.d.ts (0 errors) ==== + declare var a: a.Foo; + declare namespace a { + interface Foo {} + } + export = a; + +==== /node_modules/@types/b/index.d.ts (0 errors) ==== + import * as a from 'a'; + declare module 'a' { + namespace Test {} + + interface Foo { + Test: null; + } + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.errors.txt.diff deleted file mode 100644 index 0ebf107e9ad..00000000000 --- a/testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.errors.txt.diff +++ /dev/null @@ -1,31 +0,0 @@ ---- old.tsxResolveExternalModuleExportsTypes.errors.txt -+++ new.tsxResolveExternalModuleExportsTypes.errors.txt -@@= skipped -0, +0 lines =@@ --foo.tsx(2,10): error TS2305: Module '"a"' has no exported member 'Test'. -- -- --==== foo.tsx (1 errors) ==== -- /// -- import { Test } from 'a'; -- ~~~~ --!!! error TS2305: Module '"a"' has no exported member 'Test'. -- const Foo = (

); -- --==== /node_modules/@types/a/index.d.ts (0 errors) ==== -- declare var a: a.Foo; -- declare namespace a { -- interface Foo {} -- } -- export = a; -- --==== /node_modules/@types/b/index.d.ts (0 errors) ==== -- import * as a from 'a'; -- declare module 'a' { -- namespace Test {} -- -- interface Foo { -- Test: null; -- } -- } -- -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.symbols b/testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.symbols index 4bc6b15e6c2..8e83acd366a 100644 --- a/testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.symbols +++ b/testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.symbols @@ -12,34 +12,16 @@ const Foo = (

); === /node_modules/@types/a/index.d.ts === declare var a: a.Foo; ->a : Symbol(a, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 21), Decl(index.d.ts, 0, 23)) ->a : Symbol(a, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 21), Decl(index.d.ts, 0, 23)) ->Foo : Symbol(a.Foo, Decl(index.d.ts, 1, 21), Decl(index.d.ts, 2, 21)) +>a : Symbol(a, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 21)) +>a : Symbol(a, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 21)) +>Foo : Symbol(a.Foo, Decl(index.d.ts, 1, 21)) declare namespace a { ->a : Symbol(a, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 21), Decl(index.d.ts, 0, 23)) +>a : Symbol(a, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 21)) interface Foo {} ->Foo : Symbol(Foo, Decl(index.d.ts, 1, 21), Decl(index.d.ts, 2, 21)) +>Foo : Symbol(Foo, Decl(index.d.ts, 1, 21)) } export = a; ->a : Symbol(a, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 21), Decl(index.d.ts, 0, 23)) - -=== /node_modules/@types/b/index.d.ts === -import * as a from 'a'; ->a : Symbol(a, Decl(index.d.ts, 0, 6)) - -declare module 'a' { ->'a' : Symbol(a, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 21), Decl(index.d.ts, 0, 23)) - - namespace Test {} ->Test : Symbol(Test, Decl(index.d.ts, 1, 20)) - - interface Foo { ->Foo : Symbol(Foo, Decl(index.d.ts, 1, 21), Decl(index.d.ts, 2, 21)) - - Test: null; ->Test : Symbol(Foo.Test, Decl(index.d.ts, 4, 19)) - } -} +>a : Symbol(a, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 21)) diff --git a/testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.symbols.diff b/testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.symbols.diff deleted file mode 100644 index d7cd3b997a8..00000000000 --- a/testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.symbols.diff +++ /dev/null @@ -1,42 +0,0 @@ ---- old.tsxResolveExternalModuleExportsTypes.symbols -+++ new.tsxResolveExternalModuleExportsTypes.symbols -@@= skipped -11, +11 lines =@@ - - === /node_modules/@types/a/index.d.ts === - declare var a: a.Foo; -->a : Symbol(a, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 21)) -->a : Symbol(a, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 21)) -->Foo : Symbol(a.Foo, Decl(index.d.ts, 1, 21)) -+>a : Symbol(a, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 21), Decl(index.d.ts, 0, 23)) -+>a : Symbol(a, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 21), Decl(index.d.ts, 0, 23)) -+>Foo : Symbol(a.Foo, Decl(index.d.ts, 1, 21), Decl(index.d.ts, 2, 21)) - - declare namespace a { -->a : Symbol(a, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 21)) -+>a : Symbol(a, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 21), Decl(index.d.ts, 0, 23)) - - interface Foo {} -->Foo : Symbol(Foo, Decl(index.d.ts, 1, 21)) -+>Foo : Symbol(Foo, Decl(index.d.ts, 1, 21), Decl(index.d.ts, 2, 21)) - } - export = a; -->a : Symbol(a, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 21)) -+>a : Symbol(a, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 21), Decl(index.d.ts, 0, 23)) -+ -+=== /node_modules/@types/b/index.d.ts === -+import * as a from 'a'; -+>a : Symbol(a, Decl(index.d.ts, 0, 6)) -+ -+declare module 'a' { -+>'a' : Symbol(a, Decl(index.d.ts, 0, 11), Decl(index.d.ts, 0, 21), Decl(index.d.ts, 0, 23)) -+ -+ namespace Test {} -+>Test : Symbol(Test, Decl(index.d.ts, 1, 20)) -+ -+ interface Foo { -+>Foo : Symbol(Foo, Decl(index.d.ts, 1, 21), Decl(index.d.ts, 2, 21)) -+ -+ Test: null; -+>Test : Symbol(Foo.Test, Decl(index.d.ts, 4, 19)) -+ } -+} diff --git a/testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.types b/testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.types index fe5b27c632e..312dc6d4fdc 100644 --- a/testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.types +++ b/testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.types @@ -3,7 +3,7 @@ === foo.tsx === /// import { Test } from 'a'; ->Test : null +>Test : any const Foo = (

); >Foo : JSX.Element @@ -23,18 +23,3 @@ declare namespace a { export = a; >a : import("a").Foo -=== /node_modules/@types/b/index.d.ts === -import * as a from 'a'; ->a : a.Foo - -declare module 'a' { ->'a' : Foo - - namespace Test {} - - interface Foo { - Test: null; ->Test : null - } -} - diff --git a/testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.types.diff b/testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.types.diff index f1d944ba780..9c5be4aea80 100644 --- a/testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.types.diff +++ b/testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.types.diff @@ -1,15 +1,6 @@ --- old.tsxResolveExternalModuleExportsTypes.types +++ new.tsxResolveExternalModuleExportsTypes.types -@@= skipped -2, +2 lines =@@ - === foo.tsx === - /// - import { Test } from 'a'; -->Test : any -+>Test : null - - const Foo = (

); - >Foo : JSX.Element -@@= skipped -11, +11 lines =@@ +@@= skipped -13, +13 lines =@@ === /node_modules/@types/a/index.d.ts === declare var a: a.Foo; @@ -21,19 +12,5 @@ interface Foo {} } export = a; +->a : a.Foo +>a : import("a").Foo -+ -+=== /node_modules/@types/b/index.d.ts === -+import * as a from 'a'; - >a : a.Foo -+ -+declare module 'a' { -+>'a' : Foo -+ -+ namespace Test {} -+ -+ interface Foo { -+ Test: null; -+>Test : null -+ } -+} diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.trace.json b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.trace.json index 84f7b4a4cfa..77bdc495247 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.trace.json +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives1.trace.json @@ -5,10 +5,3 @@ File '/types/lib/package.json' does not exist. File '/types/lib/index.d.ts' exists - use it as a name resolution result. Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'. ======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ======== -======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ======== -Resolving with primary search path '/types'. -File '/types/lib.d.ts' does not exist according to earlier cached lookups. -File '/types/lib/package.json' does not exist according to earlier cached lookups. -File '/types/lib/index.d.ts' exists - use it as a name resolution result. -Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'. -======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ======== diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives10.trace.json b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives10.trace.json index 052bcd88046..70f813fef8b 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives10.trace.json +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives10.trace.json @@ -13,10 +13,3 @@ File '/ref.ts' does not exist. File '/ref.tsx' does not exist. File '/ref.d.ts' exists - use it as a name resolution result. ======== Module name './ref' was successfully resolved to '/ref.d.ts'. ======== -======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ======== -Resolving with primary search path '/types'. -File '/types/lib.d.ts' does not exist according to earlier cached lookups. -File '/types/lib/package.json' does not exist according to earlier cached lookups. -File '/types/lib/index.d.ts' exists - use it as a name resolution result. -Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'. -======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ======== diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.js b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.js index 204f86ff7f4..c313b9a328c 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.js +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.js @@ -23,24 +23,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); export interface A { x: () => typeof $; } - - -//// [DtsFileErrors] - - -/app.d.ts(2,21): error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. - - -==== /app.d.ts (1 errors) ==== - export interface A { - x: () => typeof $; - ~ -!!! error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. - } - -==== /ref.d.ts (0 errors) ==== - export interface $ { x } - -==== /types/lib/index.d.ts (0 errors) ==== - declare let $: { x: number } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.js.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.js.diff deleted file mode 100644 index 58f98a55c31..00000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.js.diff +++ /dev/null @@ -1,27 +0,0 @@ ---- old.typeReferenceDirectives13.js -+++ new.typeReferenceDirectives13.js -@@= skipped -22, +22 lines =@@ - export interface A { - x: () => typeof $; - } -+ -+ -+//// [DtsFileErrors] -+ -+ -+/app.d.ts(2,21): error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. -+ -+ -+==== /app.d.ts (1 errors) ==== -+ export interface A { -+ x: () => typeof $; -+ ~ -+!!! error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. -+ } -+ -+==== /ref.d.ts (0 errors) ==== -+ export interface $ { x } -+ -+==== /types/lib/index.d.ts (0 errors) ==== -+ declare let $: { x: number } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.trace.json b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.trace.json index b039f06e849..052bcd88046 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.trace.json +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives13.trace.json @@ -13,8 +13,10 @@ File '/ref.ts' does not exist. File '/ref.tsx' does not exist. File '/ref.d.ts' exists - use it as a name resolution result. ======== Module name './ref' was successfully resolved to '/ref.d.ts'. ======== -======== Resolving type reference directive '*', containing file '/__inferred type names__.ts', root directory '/types'. ======== +======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ======== Resolving with primary search path '/types'. -File '/types/*.d.ts' does not exist. -Resolving type reference directive for program that specifies custom typeRoots, skipping lookup in 'node_modules' folder. -======== Type reference directive '*' was not resolved. ======== +File '/types/lib.d.ts' does not exist according to earlier cached lookups. +File '/types/lib/package.json' does not exist according to earlier cached lookups. +File '/types/lib/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'. +======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ======== diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.trace.json b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.trace.json index 84f7b4a4cfa..77bdc495247 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.trace.json +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives3.trace.json @@ -5,10 +5,3 @@ File '/types/lib/package.json' does not exist. File '/types/lib/index.d.ts' exists - use it as a name resolution result. Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'. ======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ======== -======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ======== -Resolving with primary search path '/types'. -File '/types/lib.d.ts' does not exist according to earlier cached lookups. -File '/types/lib/package.json' does not exist according to earlier cached lookups. -File '/types/lib/index.d.ts' exists - use it as a name resolution result. -Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'. -======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ======== diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.trace.json b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.trace.json index 84f7b4a4cfa..77bdc495247 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.trace.json +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.trace.json @@ -5,10 +5,3 @@ File '/types/lib/package.json' does not exist. File '/types/lib/index.d.ts' exists - use it as a name resolution result. Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'. ======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ======== -======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ======== -Resolving with primary search path '/types'. -File '/types/lib.d.ts' does not exist according to earlier cached lookups. -File '/types/lib/package.json' does not exist according to earlier cached lookups. -File '/types/lib/index.d.ts' exists - use it as a name resolution result. -Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'. -======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ======== diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.js b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.js index abb51932741..a25d608bcc6 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.js +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.js @@ -22,24 +22,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); export interface A { x: typeof $; } - - -//// [DtsFileErrors] - - -/app.d.ts(2,15): error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. - - -==== /app.d.ts (1 errors) ==== - export interface A { - x: typeof $; - ~ -!!! error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. - } - -==== /ref.d.ts (0 errors) ==== - export interface $ { x } - -==== /types/lib/index.d.ts (0 errors) ==== - declare let $: { x: number } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.js.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.js.diff deleted file mode 100644 index 18dd70d860e..00000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.js.diff +++ /dev/null @@ -1,27 +0,0 @@ ---- old.typeReferenceDirectives5.js -+++ new.typeReferenceDirectives5.js -@@= skipped -21, +21 lines =@@ - export interface A { - x: typeof $; - } -+ -+ -+//// [DtsFileErrors] -+ -+ -+/app.d.ts(2,15): error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. -+ -+ -+==== /app.d.ts (1 errors) ==== -+ export interface A { -+ x: typeof $; -+ ~ -+!!! error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. -+ } -+ -+==== /ref.d.ts (0 errors) ==== -+ export interface $ { x } -+ -+==== /types/lib/index.d.ts (0 errors) ==== -+ declare let $: { x: number } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.trace.json b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.trace.json index b039f06e849..052bcd88046 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.trace.json +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives5.trace.json @@ -13,8 +13,10 @@ File '/ref.ts' does not exist. File '/ref.tsx' does not exist. File '/ref.d.ts' exists - use it as a name resolution result. ======== Module name './ref' was successfully resolved to '/ref.d.ts'. ======== -======== Resolving type reference directive '*', containing file '/__inferred type names__.ts', root directory '/types'. ======== +======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ======== Resolving with primary search path '/types'. -File '/types/*.d.ts' does not exist. -Resolving type reference directive for program that specifies custom typeRoots, skipping lookup in 'node_modules' folder. -======== Type reference directive '*' was not resolved. ======== +File '/types/lib.d.ts' does not exist according to earlier cached lookups. +File '/types/lib/package.json' does not exist according to earlier cached lookups. +File '/types/lib/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'. +======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ======== diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.js b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.js index 827cbb4ed8f..1b8e60c1c91 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.js +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.js @@ -27,27 +27,3 @@ let y = () => x; //// [app.d.ts] declare let x: $; declare let y: () => $; - - -//// [DtsFileErrors] - - -/app.d.ts(1,16): error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. -/app.d.ts(2,22): error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. - - -==== /app.d.ts (2 errors) ==== - declare let x: $; - ~ -!!! error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. - declare let y: () => $; - ~ -!!! error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. - -==== /ref.d.ts (0 errors) ==== - declare let $: { x: number } - -==== /types/lib/index.d.ts (0 errors) ==== - interface $ { x } - - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.js.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.js.diff deleted file mode 100644 index 652eed361dc..00000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.js.diff +++ /dev/null @@ -1,30 +0,0 @@ ---- old.typeReferenceDirectives6.js -+++ new.typeReferenceDirectives6.js -@@= skipped -26, +26 lines =@@ - //// [app.d.ts] - declare let x: $; - declare let y: () => $; -+ -+ -+//// [DtsFileErrors] -+ -+ -+/app.d.ts(1,16): error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. -+/app.d.ts(2,22): error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. -+ -+ -+==== /app.d.ts (2 errors) ==== -+ declare let x: $; -+ ~ -+!!! error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. -+ declare let y: () => $; -+ ~ -+!!! error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. -+ -+==== /ref.d.ts (0 errors) ==== -+ declare let $: { x: number } -+ -+==== /types/lib/index.d.ts (0 errors) ==== -+ interface $ { x } -+ -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.trace.json b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.trace.json index b452e9f4d5e..84f7b4a4cfa 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.trace.json +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.trace.json @@ -5,8 +5,10 @@ File '/types/lib/package.json' does not exist. File '/types/lib/index.d.ts' exists - use it as a name resolution result. Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'. ======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ======== -======== Resolving type reference directive '*', containing file '/__inferred type names__.ts', root directory '/types'. ======== +======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ======== Resolving with primary search path '/types'. -File '/types/*.d.ts' does not exist. -Resolving type reference directive for program that specifies custom typeRoots, skipping lookup in 'node_modules' folder. -======== Type reference directive '*' was not resolved. ======== +File '/types/lib.d.ts' does not exist according to earlier cached lookups. +File '/types/lib/package.json' does not exist according to earlier cached lookups. +File '/types/lib/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'. +======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ======== diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives7.trace.json b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives7.trace.json index 84f7b4a4cfa..77bdc495247 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives7.trace.json +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives7.trace.json @@ -5,10 +5,3 @@ File '/types/lib/package.json' does not exist. File '/types/lib/index.d.ts' exists - use it as a name resolution result. Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'. ======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ======== -======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ======== -Resolving with primary search path '/types'. -File '/types/lib.d.ts' does not exist according to earlier cached lookups. -File '/types/lib/package.json' does not exist according to earlier cached lookups. -File '/types/lib/index.d.ts' exists - use it as a name resolution result. -Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'. -======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ======== diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.js b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.js index 1f8db43b9f0..5277802efc8 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.js +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.js @@ -75,48 +75,3 @@ import "./mod1"; export declare const cls: typeof Cls; export declare const foo: Lib; export declare const bar: Lib; - - -//// [DtsFileErrors] - - -/mod1.d.ts(3,16): error TS2304: Cannot find name 'Lib'. -/mod1.d.ts(6,25): error TS2304: Cannot find name 'Lib'. -/mod2.d.ts(4,27): error TS2304: Cannot find name 'Lib'. -/mod2.d.ts(5,27): error TS2304: Cannot find name 'Lib'. - - -==== /mod2.d.ts (2 errors) ==== - import { Cls } from "./main"; - import "./mod1"; - export declare const cls: typeof Cls; - export declare const foo: Lib; - ~~~ -!!! error TS2304: Cannot find name 'Lib'. - export declare const bar: Lib; - ~~~ -!!! error TS2304: Cannot find name 'Lib'. - -==== /types/lib/index.d.ts (0 errors) ==== - interface Lib { x } - -==== /main.d.ts (0 errors) ==== - export declare class Cls { - x: any; - } - -==== /mod1.d.ts (2 errors) ==== - declare module "./main" { - interface Cls { - foo(): Lib; - ~~~ -!!! error TS2304: Cannot find name 'Lib'. - } - namespace Cls { - function bar(): Lib; - ~~~ -!!! error TS2304: Cannot find name 'Lib'. - } - } - export {}; - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.js.diff b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.js.diff deleted file mode 100644 index 3eb8506869e..00000000000 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.js.diff +++ /dev/null @@ -1,51 +0,0 @@ ---- old.typeReferenceDirectives9.js -+++ new.typeReferenceDirectives9.js -@@= skipped -74, +74 lines =@@ - export declare const cls: typeof Cls; - export declare const foo: Lib; - export declare const bar: Lib; -+ -+ -+//// [DtsFileErrors] -+ -+ -+/mod1.d.ts(3,16): error TS2304: Cannot find name 'Lib'. -+/mod1.d.ts(6,25): error TS2304: Cannot find name 'Lib'. -+/mod2.d.ts(4,27): error TS2304: Cannot find name 'Lib'. -+/mod2.d.ts(5,27): error TS2304: Cannot find name 'Lib'. -+ -+ -+==== /mod2.d.ts (2 errors) ==== -+ import { Cls } from "./main"; -+ import "./mod1"; -+ export declare const cls: typeof Cls; -+ export declare const foo: Lib; -+ ~~~ -+!!! error TS2304: Cannot find name 'Lib'. -+ export declare const bar: Lib; -+ ~~~ -+!!! error TS2304: Cannot find name 'Lib'. -+ -+==== /types/lib/index.d.ts (0 errors) ==== -+ interface Lib { x } -+ -+==== /main.d.ts (0 errors) ==== -+ export declare class Cls { -+ x: any; -+ } -+ -+==== /mod1.d.ts (2 errors) ==== -+ declare module "./main" { -+ interface Cls { -+ foo(): Lib; -+ ~~~ -+!!! error TS2304: Cannot find name 'Lib'. -+ } -+ namespace Cls { -+ function bar(): Lib; -+ ~~~ -+!!! error TS2304: Cannot find name 'Lib'. -+ } -+ } -+ export {}; -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.trace.json b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.trace.json index c4a6211b48a..87b47e2ca41 100644 --- a/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.trace.json +++ b/testdata/baselines/reference/submodule/compiler/typeReferenceDirectives9.trace.json @@ -29,8 +29,10 @@ Resolving in CJS mode with conditions 'require', 'types'. Loading module as file / folder, candidate module location '/main', target file types: TypeScript, JavaScript, Declaration, JSON. File '/main.ts' exists - use it as a name resolution result. ======== Module name './main' was successfully resolved to '/main.ts'. ======== -======== Resolving type reference directive '*', containing file '/__inferred type names__.ts', root directory '/types'. ======== +======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ======== Resolving with primary search path '/types'. -File '/types/*.d.ts' does not exist. -Resolving type reference directive for program that specifies custom typeRoots, skipping lookup in 'node_modules' folder. -======== Type reference directive '*' was not resolved. ======== +File '/types/lib.d.ts' does not exist according to earlier cached lookups. +File '/types/lib/package.json' does not exist according to earlier cached lookups. +File '/types/lib/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'. +======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ======== diff --git a/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.errors.txt b/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.errors.txt deleted file mode 100644 index db6f88f8239..00000000000 --- a/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.errors.txt +++ /dev/null @@ -1,35 +0,0 @@ -/foo/bar/a.ts(1,19): error TS2307: Cannot find module 'xyz' or its corresponding type declarations. -/foo/bar/a.ts(2,19): error TS2307: Cannot find module 'pdq' or its corresponding type declarations. -/foo/bar/a.ts(3,19): error TS2307: Cannot find module 'abc' or its corresponding type declarations. - - -==== /foo/bar/tsconfig.json (0 errors) ==== - {} - -==== /foo/bar/a.ts (3 errors) ==== - import { x } from "xyz"; - ~~~~~ -!!! error TS2307: Cannot find module 'xyz' or its corresponding type declarations. - import { y } from "pdq"; - ~~~~~ -!!! error TS2307: Cannot find module 'pdq' or its corresponding type declarations. - import { z } from "abc"; - ~~~~~ -!!! error TS2307: Cannot find module 'abc' or its corresponding type declarations. - x + y + z; - -==== /node_modules/@types/dopey/index.d.ts (0 errors) ==== - declare module "xyz" { - export const x: number; - } - -==== /foo/node_modules/@types/grumpy/index.d.ts (0 errors) ==== - declare module "pdq" { - export const y: number; - } - -==== /foo/node_modules/@types/sneezy/index.d.ts (0 errors) ==== - declare module "abc" { - export const z: number; - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.errors.txt.diff deleted file mode 100644 index b02331642b4..00000000000 --- a/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.errors.txt.diff +++ /dev/null @@ -1,39 +0,0 @@ ---- old.typeRootsFromMultipleNodeModulesDirectories.errors.txt -+++ new.typeRootsFromMultipleNodeModulesDirectories.errors.txt -@@= skipped -0, +0 lines =@@ -- -+/foo/bar/a.ts(1,19): error TS2307: Cannot find module 'xyz' or its corresponding type declarations. -+/foo/bar/a.ts(2,19): error TS2307: Cannot find module 'pdq' or its corresponding type declarations. -+/foo/bar/a.ts(3,19): error TS2307: Cannot find module 'abc' or its corresponding type declarations. -+ -+ -+==== /foo/bar/tsconfig.json (0 errors) ==== -+ {} -+ -+==== /foo/bar/a.ts (3 errors) ==== -+ import { x } from "xyz"; -+ ~~~~~ -+!!! error TS2307: Cannot find module 'xyz' or its corresponding type declarations. -+ import { y } from "pdq"; -+ ~~~~~ -+!!! error TS2307: Cannot find module 'pdq' or its corresponding type declarations. -+ import { z } from "abc"; -+ ~~~~~ -+!!! error TS2307: Cannot find module 'abc' or its corresponding type declarations. -+ x + y + z; -+ -+==== /node_modules/@types/dopey/index.d.ts (0 errors) ==== -+ declare module "xyz" { -+ export const x: number; -+ } -+ -+==== /foo/node_modules/@types/grumpy/index.d.ts (0 errors) ==== -+ declare module "pdq" { -+ export const y: number; -+ } -+ -+==== /foo/node_modules/@types/sneezy/index.d.ts (0 errors) ==== -+ declare module "abc" { -+ export const z: number; -+ } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.symbols b/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.symbols index de0abd89dcd..b536c445852 100644 --- a/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.symbols +++ b/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.symbols @@ -15,3 +15,27 @@ x + y + z; >y : Symbol(y, Decl(a.ts, 1, 8)) >z : Symbol(z, Decl(a.ts, 2, 8)) +=== /node_modules/@types/dopey/index.d.ts === +declare module "xyz" { +>"xyz" : Symbol("xyz", Decl(index.d.ts, 0, 0)) + + export const x: number; +>x : Symbol(x, Decl(index.d.ts, 1, 16)) +} + +=== /foo/node_modules/@types/grumpy/index.d.ts === +declare module "pdq" { +>"pdq" : Symbol("pdq", Decl(index.d.ts, 0, 0)) + + export const y: number; +>y : Symbol(y, Decl(index.d.ts, 1, 16)) +} + +=== /foo/node_modules/@types/sneezy/index.d.ts === +declare module "abc" { +>"abc" : Symbol("abc", Decl(index.d.ts, 0, 0)) + + export const z: number; +>z : Symbol(z, Decl(index.d.ts, 1, 16)) +} + diff --git a/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.symbols.diff b/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.symbols.diff deleted file mode 100644 index 2add4f3b5dc..00000000000 --- a/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.symbols.diff +++ /dev/null @@ -1,30 +0,0 @@ ---- old.typeRootsFromMultipleNodeModulesDirectories.symbols -+++ new.typeRootsFromMultipleNodeModulesDirectories.symbols -@@= skipped -14, +14 lines =@@ - >y : Symbol(y, Decl(a.ts, 1, 8)) - >z : Symbol(z, Decl(a.ts, 2, 8)) - --=== /node_modules/@types/dopey/index.d.ts === --declare module "xyz" { -->"xyz" : Symbol("xyz", Decl(index.d.ts, 0, 0)) -- -- export const x: number; -->x : Symbol(x, Decl(index.d.ts, 1, 16)) --} -- --=== /foo/node_modules/@types/grumpy/index.d.ts === --declare module "pdq" { -->"pdq" : Symbol("pdq", Decl(index.d.ts, 0, 0)) -- -- export const y: number; -->y : Symbol(y, Decl(index.d.ts, 1, 16)) --} -- --=== /foo/node_modules/@types/sneezy/index.d.ts === --declare module "abc" { -->"abc" : Symbol("abc", Decl(index.d.ts, 0, 0)) -- -- export const z: number; -->z : Symbol(z, Decl(index.d.ts, 1, 16)) --} -- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.trace.json b/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.trace.json index 43652dcabdf..4b61d20d972 100644 --- a/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.trace.json +++ b/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.trace.json @@ -73,15 +73,24 @@ File '/foo/node_modules/abc.jsx' does not exist. File '/node_modules/abc.js' does not exist. File '/node_modules/abc.jsx' does not exist. ======== Module name 'abc' was not resolved. ======== -======== Resolving type reference directive '*', containing file '/foo/bar/__inferred type names__.ts', root directory '/foo/bar/node_modules/@types,/foo/node_modules/@types,/node_modules/@types'. ======== +======== Resolving type reference directive 'grumpy', containing file '/foo/bar/__inferred type names__.ts', root directory '/foo/bar/node_modules/@types,/foo/node_modules/@types,/node_modules/@types'. ======== Resolving with primary search path '/foo/bar/node_modules/@types, /foo/node_modules/@types, /node_modules/@types'. Directory '/foo/bar/node_modules/@types' does not exist, skipping all lookups in it. -Looking up in 'node_modules' folder, initial location '/foo/bar'. -Searching all ancestor node_modules directories for preferred extensions: Declaration. -Directory '/foo/bar/node_modules' does not exist, skipping all lookups in it. +File '/foo/node_modules/@types/grumpy/package.json' does not exist. +File '/foo/node_modules/@types/grumpy/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/foo/node_modules/@types/grumpy/index.d.ts', result '/foo/node_modules/@types/grumpy/index.d.ts'. +======== Type reference directive 'grumpy' was successfully resolved to '/foo/node_modules/@types/grumpy/index.d.ts', primary: true. ======== +======== Resolving type reference directive 'sneezy', containing file '/foo/bar/__inferred type names__.ts', root directory '/foo/bar/node_modules/@types,/foo/node_modules/@types,/node_modules/@types'. ======== +Resolving with primary search path '/foo/bar/node_modules/@types, /foo/node_modules/@types, /node_modules/@types'. +Directory '/foo/bar/node_modules/@types' does not exist, skipping all lookups in it. +File '/foo/node_modules/@types/sneezy/package.json' does not exist. +File '/foo/node_modules/@types/sneezy/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/foo/node_modules/@types/sneezy/index.d.ts', result '/foo/node_modules/@types/sneezy/index.d.ts'. +======== Type reference directive 'sneezy' was successfully resolved to '/foo/node_modules/@types/sneezy/index.d.ts', primary: true. ======== +======== Resolving type reference directive 'dopey', containing file '/foo/bar/__inferred type names__.ts', root directory '/foo/bar/node_modules/@types,/foo/node_modules/@types,/node_modules/@types'. ======== +Resolving with primary search path '/foo/bar/node_modules/@types, /foo/node_modules/@types, /node_modules/@types'. Directory '/foo/bar/node_modules/@types' does not exist, skipping all lookups in it. -File '/foo/node_modules/*.d.ts' does not exist. -File '/foo/node_modules/@types/*.d.ts' does not exist. -File '/node_modules/*.d.ts' does not exist. -File '/node_modules/@types/*.d.ts' does not exist. -======== Type reference directive '*' was not resolved. ======== +File '/node_modules/@types/dopey/package.json' does not exist. +File '/node_modules/@types/dopey/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/node_modules/@types/dopey/index.d.ts', result '/node_modules/@types/dopey/index.d.ts'. +======== Type reference directive 'dopey' was successfully resolved to '/node_modules/@types/dopey/index.d.ts', primary: true. ======== diff --git a/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.types b/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.types index 13fefaaac4e..5dcad392f83 100644 --- a/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.types +++ b/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.types @@ -2,18 +2,42 @@ === /foo/bar/a.ts === import { x } from "xyz"; ->x : any +>x : number import { y } from "pdq"; ->y : any +>y : number import { z } from "abc"; ->z : any +>z : number x + y + z; ->x + y + z : any ->x + y : any ->x : any ->y : any ->z : any +>x + y + z : number +>x + y : number +>x : number +>y : number +>z : number + +=== /node_modules/@types/dopey/index.d.ts === +declare module "xyz" { +>"xyz" : typeof import("xyz") + + export const x: number; +>x : number +} + +=== /foo/node_modules/@types/grumpy/index.d.ts === +declare module "pdq" { +>"pdq" : typeof import("pdq") + + export const y: number; +>y : number +} + +=== /foo/node_modules/@types/sneezy/index.d.ts === +declare module "abc" { +>"abc" : typeof import("abc") + + export const z: number; +>z : number +} diff --git a/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.types.diff b/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.types.diff deleted file mode 100644 index be26de4722d..00000000000 --- a/testdata/baselines/reference/submodule/compiler/typeRootsFromMultipleNodeModulesDirectories.types.diff +++ /dev/null @@ -1,52 +0,0 @@ ---- old.typeRootsFromMultipleNodeModulesDirectories.types -+++ new.typeRootsFromMultipleNodeModulesDirectories.types -@@= skipped -1, +1 lines =@@ - - === /foo/bar/a.ts === - import { x } from "xyz"; -->x : number -+>x : any - - import { y } from "pdq"; -->y : number -+>y : any - - import { z } from "abc"; -->z : number -+>z : any - - x + y + z; -->x + y + z : number -->x + y : number -->x : number -->y : number -->z : number -- --=== /node_modules/@types/dopey/index.d.ts === --declare module "xyz" { -->"xyz" : typeof import("xyz") -- -- export const x: number; -->x : number --} -- --=== /foo/node_modules/@types/grumpy/index.d.ts === --declare module "pdq" { -->"pdq" : typeof import("pdq") -- -- export const y: number; -->y : number --} -- --=== /foo/node_modules/@types/sneezy/index.d.ts === --declare module "abc" { -->"abc" : typeof import("abc") -- -- export const z: number; -->z : number --} -+>x + y + z : any -+>x + y : any -+>x : any -+>y : any -+>z : any diff --git a/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.errors.txt b/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.errors.txt deleted file mode 100644 index d7d47d39022..00000000000 --- a/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.errors.txt +++ /dev/null @@ -1,17 +0,0 @@ -/src/a.ts(1,19): error TS2307: Cannot find module 'xyz' or its corresponding type declarations. - - -==== /src/tsconfig.json (0 errors) ==== - {} - -==== /src/a.ts (1 errors) ==== - import { x } from "xyz"; - ~~~~~ -!!! error TS2307: Cannot find module 'xyz' or its corresponding type declarations. - x; - -==== /node_modules/@types/foo/index.d.ts (0 errors) ==== - declare module "xyz" { - export const x: number; - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.errors.txt.diff deleted file mode 100644 index f9143fd2d6d..00000000000 --- a/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.errors.txt.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.typeRootsFromNodeModulesInParentDirectory.errors.txt -+++ new.typeRootsFromNodeModulesInParentDirectory.errors.txt -@@= skipped -0, +0 lines =@@ -- -+/src/a.ts(1,19): error TS2307: Cannot find module 'xyz' or its corresponding type declarations. -+ -+ -+==== /src/tsconfig.json (0 errors) ==== -+ {} -+ -+==== /src/a.ts (1 errors) ==== -+ import { x } from "xyz"; -+ ~~~~~ -+!!! error TS2307: Cannot find module 'xyz' or its corresponding type declarations. -+ x; -+ -+==== /node_modules/@types/foo/index.d.ts (0 errors) ==== -+ declare module "xyz" { -+ export const x: number; -+ } -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.symbols b/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.symbols index 2f058735cf2..761a92a1326 100644 --- a/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.symbols +++ b/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.symbols @@ -7,3 +7,11 @@ import { x } from "xyz"; x; >x : Symbol(x, Decl(a.ts, 0, 8)) +=== /node_modules/@types/foo/index.d.ts === +declare module "xyz" { +>"xyz" : Symbol("xyz", Decl(index.d.ts, 0, 0)) + + export const x: number; +>x : Symbol(x, Decl(index.d.ts, 1, 16)) +} + diff --git a/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.symbols.diff b/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.symbols.diff deleted file mode 100644 index de7220672eb..00000000000 --- a/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.symbols.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.typeRootsFromNodeModulesInParentDirectory.symbols -+++ new.typeRootsFromNodeModulesInParentDirectory.symbols -@@= skipped -6, +6 lines =@@ - x; - >x : Symbol(x, Decl(a.ts, 0, 8)) - --=== /node_modules/@types/foo/index.d.ts === --declare module "xyz" { -->"xyz" : Symbol("xyz", Decl(index.d.ts, 0, 0)) -- -- export const x: number; -->x : Symbol(x, Decl(index.d.ts, 1, 16)) --} -- \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.trace.json b/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.trace.json index e09f8854876..e9993d5ed57 100644 --- a/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.trace.json +++ b/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.trace.json @@ -16,13 +16,10 @@ Directory '/src/node_modules' does not exist, skipping all lookups in it. File '/node_modules/xyz.js' does not exist. File '/node_modules/xyz.jsx' does not exist. ======== Module name 'xyz' was not resolved. ======== -======== Resolving type reference directive '*', containing file '/src/__inferred type names__.ts', root directory '/src/node_modules/@types,/node_modules/@types'. ======== +======== Resolving type reference directive 'foo', containing file '/src/__inferred type names__.ts', root directory '/src/node_modules/@types,/node_modules/@types'. ======== Resolving with primary search path '/src/node_modules/@types, /node_modules/@types'. Directory '/src/node_modules/@types' does not exist, skipping all lookups in it. -Looking up in 'node_modules' folder, initial location '/src'. -Searching all ancestor node_modules directories for preferred extensions: Declaration. -Directory '/src/node_modules' does not exist, skipping all lookups in it. -Directory '/src/node_modules/@types' does not exist, skipping all lookups in it. -File '/node_modules/*.d.ts' does not exist. -File '/node_modules/@types/*.d.ts' does not exist. -======== Type reference directive '*' was not resolved. ======== +File '/node_modules/@types/foo/package.json' does not exist. +File '/node_modules/@types/foo/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/node_modules/@types/foo/index.d.ts', result '/node_modules/@types/foo/index.d.ts'. +======== Type reference directive 'foo' was successfully resolved to '/node_modules/@types/foo/index.d.ts', primary: true. ======== diff --git a/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.types b/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.types index 0e35e38fec8..ccbc72cb845 100644 --- a/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.types +++ b/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.types @@ -2,8 +2,16 @@ === /src/a.ts === import { x } from "xyz"; ->x : any +>x : number x; ->x : any +>x : number + +=== /node_modules/@types/foo/index.d.ts === +declare module "xyz" { +>"xyz" : typeof import("xyz") + + export const x: number; +>x : number +} diff --git a/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.types.diff b/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.types.diff deleted file mode 100644 index 367db3203d6..00000000000 --- a/testdata/baselines/reference/submodule/compiler/typeRootsFromNodeModulesInParentDirectory.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.typeRootsFromNodeModulesInParentDirectory.types -+++ new.typeRootsFromNodeModulesInParentDirectory.types -@@= skipped -1, +1 lines =@@ - - === /src/a.ts === - import { x } from "xyz"; -->x : number -+>x : any - - x; -->x : number -- --=== /node_modules/@types/foo/index.d.ts === --declare module "xyz" { -->"xyz" : typeof import("xyz") -- -- export const x: number; -->x : number --} -+>x : any diff --git a/testdata/baselines/reference/submodule/compiler/typecheckIfCondition.errors.txt b/testdata/baselines/reference/submodule/compiler/typecheckIfCondition.errors.txt index ef675fd5cbb..d665c469bee 100644 --- a/testdata/baselines/reference/submodule/compiler/typecheckIfCondition.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/typecheckIfCondition.errors.txt @@ -1,5 +1,5 @@ -typecheckIfCondition.ts(4,10): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -typecheckIfCondition.ts(4,26): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +typecheckIfCondition.ts(4,10): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. +typecheckIfCondition.ts(4,26): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ==== typecheckIfCondition.ts (2 errors) ==== @@ -8,9 +8,9 @@ typecheckIfCondition.ts(4,26): error TS2580: Cannot find name 'module'. Do you n { if (!module.exports) module.exports = ""; ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. var x = null; // don't want to baseline output } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typecheckIfCondition.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/typecheckIfCondition.errors.txt.diff deleted file mode 100644 index 96adb6cc9bb..00000000000 --- a/testdata/baselines/reference/submodule/compiler/typecheckIfCondition.errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.typecheckIfCondition.errors.txt -+++ new.typecheckIfCondition.errors.txt -@@= skipped -0, +0 lines =@@ --typecheckIfCondition.ts(4,10): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. --typecheckIfCondition.ts(4,26): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+typecheckIfCondition.ts(4,10): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -+typecheckIfCondition.ts(4,26): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - - - ==== typecheckIfCondition.ts (2 errors) ==== -@@= skipped -7, +7 lines =@@ - { - if (!module.exports) module.exports = ""; - ~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - ~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - var x = null; // don't want to baseline output - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/undeclaredModuleError.errors.txt b/testdata/baselines/reference/submodule/compiler/undeclaredModuleError.errors.txt index 29607555654..965b4722fa0 100644 --- a/testdata/baselines/reference/submodule/compiler/undeclaredModuleError.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/undeclaredModuleError.errors.txt @@ -1,4 +1,4 @@ -undeclaredModuleError.ts(1,21): error TS2307: Cannot find module 'fs' or its corresponding type declarations. +undeclaredModuleError.ts(1,21): error TS2591: Cannot find name 'fs'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. undeclaredModuleError.ts(8,29): error TS2345: Argument of type '() => void' is not assignable to parameter of type '(stat: fs.Stats, name: string) => boolean'. Type 'void' is not assignable to type 'boolean'. undeclaredModuleError.ts(11,41): error TS2304: Cannot find name 'IDoNotExist'. @@ -7,7 +7,7 @@ undeclaredModuleError.ts(11,41): error TS2304: Cannot find name 'IDoNotExist'. ==== undeclaredModuleError.ts (3 errors) ==== import fs = require('fs'); ~~~~ -!!! error TS2307: Cannot find module 'fs' or its corresponding type declarations. +!!! error TS2591: Cannot find name 'fs'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. function readdir(path: string, accept: (stat: fs.Stats, name: string) => boolean, callback: (error: Error, results: { name: string; stat: fs.Stats; }[]) => void ) {} function join(...paths: string[]) {} diff --git a/testdata/baselines/reference/submodule/compiler/undeclaredModuleError.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/undeclaredModuleError.errors.txt.diff deleted file mode 100644 index 95b2d826803..00000000000 --- a/testdata/baselines/reference/submodule/compiler/undeclaredModuleError.errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.undeclaredModuleError.errors.txt -+++ new.undeclaredModuleError.errors.txt -@@= skipped -0, +0 lines =@@ --undeclaredModuleError.ts(1,21): error TS2591: Cannot find name 'fs'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+undeclaredModuleError.ts(1,21): error TS2307: Cannot find module 'fs' or its corresponding type declarations. - undeclaredModuleError.ts(8,29): error TS2345: Argument of type '() => void' is not assignable to parameter of type '(stat: fs.Stats, name: string) => boolean'. - Type 'void' is not assignable to type 'boolean'. - undeclaredModuleError.ts(11,41): error TS2304: Cannot find name 'IDoNotExist'. -@@= skipped -6, +6 lines =@@ - ==== undeclaredModuleError.ts (3 errors) ==== - import fs = require('fs'); - ~~~~ --!!! error TS2591: Cannot find name 'fs'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2307: Cannot find module 'fs' or its corresponding type declarations. - function readdir(path: string, accept: (stat: fs.Stats, name: string) => boolean, callback: (error: Error, results: { name: string; stat: fs.Stats; }[]) => void ) {} - - function join(...paths: string[]) {} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/emit(jsx=preserve).errors.txt b/testdata/baselines/reference/submodule/conformance/emit(jsx=preserve).errors.txt index 1773f6de8b9..58319e9fd5d 100644 --- a/testdata/baselines/reference/submodule/conformance/emit(jsx=preserve).errors.txt +++ b/testdata/baselines/reference/submodule/conformance/emit(jsx=preserve).errors.txt @@ -18,7 +18,7 @@ no.ts(6,16): error TS2307: Cannot find module './foo.d.mts' or its corresponding no.ts(7,16): error TS2307: Cannot find module './foo.d.css.ts' or its corresponding type declarations. no.ts(8,16): error TS2307: Cannot find module '#internal/foo.ts' or its corresponding type declarations. no.ts(9,16): error TS2307: Cannot find module 'node:foo.ts' or its corresponding type declarations. -no.ts(11,8): error TS2307: Cannot find module 'node:path' or its corresponding type declarations. +no.ts(11,8): error TS2591: Cannot find name 'node:path'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ==== globals.d.ts (0 errors) ==== @@ -111,7 +111,7 @@ no.ts(11,8): error TS2307: Cannot find module 'node:path' or its corresponding t (require)("./foo.ts"); import("node:path"); ~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'node:path' or its corresponding type declarations. +!!! error TS2591: Cannot find name 'node:path'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. require("node:path"); ==== lol.ts (0 errors) ==== diff --git a/testdata/baselines/reference/submodule/conformance/emit(jsx=preserve).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/emit(jsx=preserve).errors.txt.diff deleted file mode 100644 index dbe6ce832ed..00000000000 --- a/testdata/baselines/reference/submodule/conformance/emit(jsx=preserve).errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.emit(jsx=preserve).errors.txt -+++ new.emit(jsx=preserve).errors.txt -@@= skipped -17, +17 lines =@@ - no.ts(7,16): error TS2307: Cannot find module './foo.d.css.ts' or its corresponding type declarations. - no.ts(8,16): error TS2307: Cannot find module '#internal/foo.ts' or its corresponding type declarations. - no.ts(9,16): error TS2307: Cannot find module 'node:foo.ts' or its corresponding type declarations. --no.ts(11,8): error TS2591: Cannot find name 'node:path'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+no.ts(11,8): error TS2307: Cannot find module 'node:path' or its corresponding type declarations. - - - ==== globals.d.ts (0 errors) ==== -@@= skipped -93, +93 lines =@@ - (require)("./foo.ts"); - import("node:path"); - ~~~~~~~~~~~ --!!! error TS2591: Cannot find name 'node:path'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2307: Cannot find module 'node:path' or its corresponding type declarations. - require("node:path"); - - ==== lol.ts (0 errors) ==== \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/emit(jsx=react).errors.txt b/testdata/baselines/reference/submodule/conformance/emit(jsx=react).errors.txt index 1773f6de8b9..58319e9fd5d 100644 --- a/testdata/baselines/reference/submodule/conformance/emit(jsx=react).errors.txt +++ b/testdata/baselines/reference/submodule/conformance/emit(jsx=react).errors.txt @@ -18,7 +18,7 @@ no.ts(6,16): error TS2307: Cannot find module './foo.d.mts' or its corresponding no.ts(7,16): error TS2307: Cannot find module './foo.d.css.ts' or its corresponding type declarations. no.ts(8,16): error TS2307: Cannot find module '#internal/foo.ts' or its corresponding type declarations. no.ts(9,16): error TS2307: Cannot find module 'node:foo.ts' or its corresponding type declarations. -no.ts(11,8): error TS2307: Cannot find module 'node:path' or its corresponding type declarations. +no.ts(11,8): error TS2591: Cannot find name 'node:path'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ==== globals.d.ts (0 errors) ==== @@ -111,7 +111,7 @@ no.ts(11,8): error TS2307: Cannot find module 'node:path' or its corresponding t (require)("./foo.ts"); import("node:path"); ~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'node:path' or its corresponding type declarations. +!!! error TS2591: Cannot find name 'node:path'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. require("node:path"); ==== lol.ts (0 errors) ==== diff --git a/testdata/baselines/reference/submodule/conformance/emit(jsx=react).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/emit(jsx=react).errors.txt.diff deleted file mode 100644 index 7823de5a159..00000000000 --- a/testdata/baselines/reference/submodule/conformance/emit(jsx=react).errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.emit(jsx=react).errors.txt -+++ new.emit(jsx=react).errors.txt -@@= skipped -17, +17 lines =@@ - no.ts(7,16): error TS2307: Cannot find module './foo.d.css.ts' or its corresponding type declarations. - no.ts(8,16): error TS2307: Cannot find module '#internal/foo.ts' or its corresponding type declarations. - no.ts(9,16): error TS2307: Cannot find module 'node:foo.ts' or its corresponding type declarations. --no.ts(11,8): error TS2591: Cannot find name 'node:path'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+no.ts(11,8): error TS2307: Cannot find module 'node:path' or its corresponding type declarations. - - - ==== globals.d.ts (0 errors) ==== -@@= skipped -93, +93 lines =@@ - (require)("./foo.ts"); - import("node:path"); - ~~~~~~~~~~~ --!!! error TS2591: Cannot find name 'node:path'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2307: Cannot find module 'node:path' or its corresponding type declarations. - require("node:path"); - - ==== lol.ts (0 errors) ==== \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/fixSignatureCaching.errors.txt b/testdata/baselines/reference/submodule/conformance/fixSignatureCaching.errors.txt index c6a19104400..5c3ceb0cf96 100644 --- a/testdata/baselines/reference/submodule/conformance/fixSignatureCaching.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/fixSignatureCaching.errors.txt @@ -50,9 +50,9 @@ fixSignatureCaching.ts(915,36): error TS2339: Property 'findMatches' does not ex fixSignatureCaching.ts(915,53): error TS2339: Property 'mobileDetectRules' does not exist on type '{}'. fixSignatureCaching.ts(955,42): error TS2339: Property 'mobileGrade' does not exist on type '{}'. fixSignatureCaching.ts(964,57): error TS2339: Property 'getDeviceSmallerSide' does not exist on type '{}'. -fixSignatureCaching.ts(978,16): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -fixSignatureCaching.ts(978,42): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -fixSignatureCaching.ts(979,37): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +fixSignatureCaching.ts(978,16): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. +fixSignatureCaching.ts(978,42): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. +fixSignatureCaching.ts(979,37): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. fixSignatureCaching.ts(980,23): error TS2304: Cannot find name 'define'. fixSignatureCaching.ts(980,48): error TS2304: Cannot find name 'define'. fixSignatureCaching.ts(981,16): error TS2304: Cannot find name 'define'. @@ -1143,12 +1143,12 @@ fixSignatureCaching.ts(983,44): error TS2339: Property 'MobileDetect' does not e })((function (undefined) { if (typeof module !== 'undefined' && module.exports) { ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. return function (factory) { module.exports = factory(); }; ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. } else if (typeof define === 'function' && define.amd) { ~~~~~~ !!! error TS2304: Cannot find name 'define'. diff --git a/testdata/baselines/reference/submodule/conformance/fixSignatureCaching.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/fixSignatureCaching.errors.txt.diff deleted file mode 100644 index 7b8f586b3d5..00000000000 --- a/testdata/baselines/reference/submodule/conformance/fixSignatureCaching.errors.txt.diff +++ /dev/null @@ -1,31 +0,0 @@ ---- old.fixSignatureCaching.errors.txt -+++ new.fixSignatureCaching.errors.txt -@@= skipped -49, +49 lines =@@ - fixSignatureCaching.ts(915,53): error TS2339: Property 'mobileDetectRules' does not exist on type '{}'. - fixSignatureCaching.ts(955,42): error TS2339: Property 'mobileGrade' does not exist on type '{}'. - fixSignatureCaching.ts(964,57): error TS2339: Property 'getDeviceSmallerSide' does not exist on type '{}'. --fixSignatureCaching.ts(978,16): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. --fixSignatureCaching.ts(978,42): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. --fixSignatureCaching.ts(979,37): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+fixSignatureCaching.ts(978,16): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -+fixSignatureCaching.ts(978,42): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -+fixSignatureCaching.ts(979,37): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - fixSignatureCaching.ts(980,23): error TS2304: Cannot find name 'define'. - fixSignatureCaching.ts(980,48): error TS2304: Cannot find name 'define'. - fixSignatureCaching.ts(981,16): error TS2304: Cannot find name 'define'. -@@= skipped -1093, +1093 lines =@@ - })((function (undefined) { - if (typeof module !== 'undefined' && module.exports) { - ~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - ~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - return function (factory) { module.exports = factory(); }; - ~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - } else if (typeof define === 'function' && define.amd) { - ~~~~~~ - !!! error TS2304: Cannot find name 'define'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportDefinePropertyEmit.js b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportDefinePropertyEmit.js index cd9b7942bec..f7794f35a4c 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportDefinePropertyEmit.js +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportDefinePropertyEmit.js @@ -182,9 +182,9 @@ out/index.d.ts(4,25): error TS18057: String literal import and export names are out/index.d.ts(12,25): error TS18057: String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'. out/index.d.ts(21,25): error TS18057: String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'. out/index.d.ts(28,25): error TS18057: String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'. -out/index.d.ts(36,15): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +out/index.d.ts(36,15): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. out/index.d.ts(39,25): error TS18057: String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'. -out/index.d.ts(47,15): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +out/index.d.ts(47,15): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. out/index.d.ts(50,25): error TS18057: String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'. out/index.d.ts(52,25): error TS18057: String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'. out/index.d.ts(54,25): error TS18057: String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'. @@ -240,7 +240,7 @@ out/index.d.ts(58,26): error TS18057: String literal import and export names are }, b: { y: typeof module.exports.b; ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. }): void | ""; declare const _exported_5: typeof g; export { _exported_5 as "g" }; @@ -255,7 +255,7 @@ out/index.d.ts(58,26): error TS18057: String literal import and export names are }, b: { y: typeof module.exports.b; ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. }): void | ""; declare const _exported_6: typeof hh; export { _exported_6 as "h" }; diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportDefinePropertyEmit.js.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportDefinePropertyEmit.js.diff index 99a5ce9e948..05e3267fd26 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportDefinePropertyEmit.js.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportDefinePropertyEmit.js.diff @@ -99,9 +99,9 @@ +out/index.d.ts(12,25): error TS18057: String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'. +out/index.d.ts(21,25): error TS18057: String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'. +out/index.d.ts(28,25): error TS18057: String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'. -+out/index.d.ts(36,15): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. ++out/index.d.ts(36,15): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. +out/index.d.ts(39,25): error TS18057: String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'. -+out/index.d.ts(47,15): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. ++out/index.d.ts(47,15): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. +out/index.d.ts(50,25): error TS18057: String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'. +out/index.d.ts(52,25): error TS18057: String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'. +out/index.d.ts(54,25): error TS18057: String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'. @@ -181,7 +181,7 @@ + }, b: { + y: typeof module.exports.b; + ~~~~~~ -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. ++!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. + }): void | ""; + declare const _exported_5: typeof g; + export { _exported_5 as "g" }; @@ -196,7 +196,7 @@ + }, b: { + y: typeof module.exports.b; + ~~~~~~ -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. ++!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. + }): void | ""; + declare const _exported_6: typeof hh; + export { _exported_6 as "h" }; diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsModuleReferenceHasEmit(target=es2015).errors.txt b/testdata/baselines/reference/submodule/conformance/jsDeclarationsModuleReferenceHasEmit(target=es2015).errors.txt index 03ef528a8c5..209b22f6059 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsModuleReferenceHasEmit(target=es2015).errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsModuleReferenceHasEmit(target=es2015).errors.txt @@ -1,4 +1,4 @@ -index.js(9,11): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +index.js(9,11): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. index.js(9,17): error TS1005: '}' expected. @@ -13,7 +13,7 @@ index.js(9,17): error TS1005: '}' expected. * Target element * @type {module:A} ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ~ !!! error TS1005: '}' expected. */ diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsModuleReferenceHasEmit(target=es2015).errors.txt.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsModuleReferenceHasEmit(target=es2015).errors.txt.diff index dd8570bdf1b..0fc0c0e5900 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsModuleReferenceHasEmit(target=es2015).errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsModuleReferenceHasEmit(target=es2015).errors.txt.diff @@ -2,7 +2,7 @@ +++ new.jsDeclarationsModuleReferenceHasEmit(target=es2015).errors.txt @@= skipped -0, +0 lines =@@ - -+index.js(9,11): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. ++index.js(9,11): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. +index.js(9,17): error TS1005: '}' expected. + + @@ -17,7 +17,7 @@ + * Target element + * @type {module:A} + ~~~~~~ -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. ++!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. + ~ +!!! error TS1005: '}' expected. + */ diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypeReferences(target=es2015).js b/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypeReferences(target=es2015).js index 7cd10dfc69f..189b0b17e9c 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypeReferences(target=es2015).js +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypeReferences(target=es2015).js @@ -31,23 +31,3 @@ declare const _default: { thing: import("fs").Something; }; export = _default; - - -//// [DtsFileErrors] - - -tests/cases/conformance/jsdoc/declarations/out/index.d.ts(2,19): error TS2307: Cannot find module 'fs' or its corresponding type declarations. - - -==== tests/cases/conformance/jsdoc/declarations/out/index.d.ts (1 errors) ==== - declare const _default: { - thing: import("fs").Something; - ~~~~ -!!! error TS2307: Cannot find module 'fs' or its corresponding type declarations. - }; - export = _default; - -==== node_modules/@types/node/index.d.ts (0 errors) ==== - declare module "fs" { - export class Something {} - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypeReferences(target=es2015).js.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypeReferences(target=es2015).js.diff index 652b95cd34c..71a5206de52 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypeReferences(target=es2015).js.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsTypeReferences(target=es2015).js.diff @@ -10,24 +10,4 @@ +declare const _default: { + thing: import("fs").Something; +}; -+export = _default; -+ -+ -+//// [DtsFileErrors] -+ -+ -+tests/cases/conformance/jsdoc/declarations/out/index.d.ts(2,19): error TS2307: Cannot find module 'fs' or its corresponding type declarations. -+ -+ -+==== tests/cases/conformance/jsdoc/declarations/out/index.d.ts (1 errors) ==== -+ declare const _default: { -+ thing: import("fs").Something; -+ ~~~~ -+!!! error TS2307: Cannot find module 'fs' or its corresponding type declarations. -+ }; -+ export = _default; -+ -+==== node_modules/@types/node/index.d.ts (0 errors) ==== -+ declare module "fs" { -+ export class Something {} -+ } \ No newline at end of file ++export = _default; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/jsxAndTypeAssertion.errors.txt b/testdata/baselines/reference/submodule/conformance/jsxAndTypeAssertion.errors.txt index bd6a00ad2ab..251218ebc48 100644 --- a/testdata/baselines/reference/submodule/conformance/jsxAndTypeAssertion.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/jsxAndTypeAssertion.errors.txt @@ -1,6 +1,6 @@ jsxAndTypeAssertion.tsx(6,5): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists. jsxAndTypeAssertion.tsx(6,6): error TS17008: JSX element 'any' has no corresponding closing tag. -jsxAndTypeAssertion.tsx(6,13): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +jsxAndTypeAssertion.tsx(6,13): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig. jsxAndTypeAssertion.tsx(6,17): error TS1005: '}' expected. jsxAndTypeAssertion.tsx(6,19): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists. jsxAndTypeAssertion.tsx(6,24): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists. @@ -65,7 +65,7 @@ jsxAndTypeAssertion.tsx(21,1): error TS1005: '({ workItem: this._workItem }, {}); ~ -!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. +!!! error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserCommaInTypeMemberList2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserCommaInTypeMemberList2.errors.txt.diff deleted file mode 100644 index 59347d56689..00000000000 --- a/testdata/baselines/reference/submodule/conformance/parserCommaInTypeMemberList2.errors.txt.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- old.parserCommaInTypeMemberList2.errors.txt -+++ new.parserCommaInTypeMemberList2.errors.txt -@@= skipped -0, +0 lines =@@ --parserCommaInTypeMemberList2.ts(1,9): error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. -+parserCommaInTypeMemberList2.ts(1,9): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - - - ==== parserCommaInTypeMemberList2.ts (1 errors) ==== - var s = $.extend< { workItem: any }, { workItem: any, width: string }>({ workItem: this._workItem }, {}); - ~ --!!! error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. -+!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserharness.errors.txt b/testdata/baselines/reference/submodule/conformance/parserharness.errors.txt index 424d7490f92..f8052d2b85b 100644 --- a/testdata/baselines/reference/submodule/conformance/parserharness.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserharness.errors.txt @@ -5,8 +5,8 @@ parserharness.ts(24,13): error TS7005: Variable 'run' implicitly has an 'any' ty parserharness.ts(25,17): error TS2304: Cannot find name 'IIO'. parserharness.ts(26,13): error TS7005: Variable '__dirname' implicitly has an 'any' type. parserharness.ts(41,12): error TS2304: Cannot find name 'ActiveXObject'. -parserharness.ts(43,19): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -parserharness.ts(44,14): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +parserharness.ts(43,19): error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. +parserharness.ts(44,14): error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. parserharness.ts(52,21): error TS7010: 'on', which lacks return-type annotation, implicitly has an 'any' return type. parserharness.ts(116,31): error TS7006: Parameter 'actual' implicitly has an 'any' type. parserharness.ts(116,39): error TS7006: Parameter 'expected' implicitly has an 'any' type. @@ -262,10 +262,10 @@ parserharness.ts(2067,62): error TS18048: 'comparison' is possibly 'undefined'. eval(typescriptServiceFile); } else if (typeof require === "function") { ~~~~~~~ -!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. var vm = require('vm'); ~~~~~~~ -!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. vm.runInThisContext(typescriptServiceFile, 'typescriptServices.js'); } else { throw new Error('Unknown context'); diff --git a/testdata/baselines/reference/submodule/conformance/parserharness.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserharness.errors.txt.diff index 3ffee79a93b..664dd212899 100644 --- a/testdata/baselines/reference/submodule/conformance/parserharness.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/parserharness.errors.txt.diff @@ -8,18 +8,7 @@ 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(22,13): error TS7005: Variable 'it' implicitly has an 'any' type. parserharness.ts(23,13): error TS7005: Variable 'describe' implicitly has an 'any' type. -@@= skipped -8, +4 lines =@@ - parserharness.ts(25,17): error TS2304: Cannot find name 'IIO'. - parserharness.ts(26,13): error TS7005: Variable '__dirname' implicitly has an 'any' type. - parserharness.ts(41,12): error TS2304: Cannot find name 'ActiveXObject'. --parserharness.ts(43,19): error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. --parserharness.ts(44,14): error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+parserharness.ts(43,19): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -+parserharness.ts(44,14): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - parserharness.ts(52,21): error TS7010: 'on', which lacks return-type annotation, implicitly has an 'any' return type. - parserharness.ts(116,31): error TS7006: Parameter 'actual' implicitly has an 'any' type. - parserharness.ts(116,39): error TS7006: Parameter 'expected' implicitly has an 'any' type. -@@= skipped -64, +64 lines =@@ +@@= skipped -72, +68 lines =@@ No index signature with a parameter of type 'string' was found on type '{}'. parserharness.ts(754,53): error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? parserharness.ts(764,56): error TS2503: Cannot find namespace 'TypeScript'. @@ -199,20 +188,7 @@ declare var assert: Harness.Assert; ~~~~~~~~~~~~~~ -@@= skipped -50, +42 lines =@@ - eval(typescriptServiceFile); - } else if (typeof require === "function") { - ~~~~~~~ --!!! error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - var vm = require('vm'); - ~~~~~~~ --!!! error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - vm.runInThisContext(typescriptServiceFile, 'typescriptServices.js'); - } else { - throw new Error('Unknown context'); -@@= skipped -847, +847 lines =@@ +@@= skipped -897, +889 lines =@@ !!! error TS2503: Cannot find namespace 'TypeScript'. var compiler = c || new TypeScript.TypeScriptCompiler(stderr); ~~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/conformance/resolvesWithoutExportsDiagnostic1(moduleresolution=bundler).trace.json b/testdata/baselines/reference/submodule/conformance/resolvesWithoutExportsDiagnostic1(moduleresolution=bundler).trace.json index 17a9c559558..3a45cbbe16b 100644 --- a/testdata/baselines/reference/submodule/conformance/resolvesWithoutExportsDiagnostic1(moduleresolution=bundler).trace.json +++ b/testdata/baselines/reference/submodule/conformance/resolvesWithoutExportsDiagnostic1(moduleresolution=bundler).trace.json @@ -109,13 +109,3 @@ File '/node_modules/@types/bar/index.d.ts' exists - use it as a name resolution 'package.json' does not have a 'peerDependencies' field. Resolving real path for '/node_modules/@types/bar/index.d.ts', result '/node_modules/@types/bar/index.d.ts'. ======== Module name 'bar' was successfully resolved to '/node_modules/bar/index.mjs' with Package ID 'bar/index.mjs@1.0.0'. ======== -======== Resolving type reference directive 'bar', containing file '/.src/__inferred type names__.ts', root directory '/.src/node_modules/@types,/node_modules/@types'. ======== -Resolving with primary search path '/.src/node_modules/@types, /node_modules/@types'. -Directory '/.src/node_modules/@types' does not exist, skipping all lookups in it. -File '/node_modules/@types/bar/package.json' exists according to earlier cached lookups. -'package.json' does not have a 'typesVersions' field. -'package.json' does not have a 'typings' field. -'package.json' has 'types' field 'index.d.ts' that references '/node_modules/@types/bar/index.d.ts'. -File '/node_modules/@types/bar/index.d.ts' exists - use it as a name resolution result. -Resolving real path for '/node_modules/@types/bar/index.d.ts', result '/node_modules/@types/bar/index.d.ts'. -======== Type reference directive 'bar' was successfully resolved to '/node_modules/@types/bar/index.d.ts', primary: true. ======== diff --git a/testdata/baselines/reference/submodule/conformance/resolvesWithoutExportsDiagnostic1(moduleresolution=node16).trace.json b/testdata/baselines/reference/submodule/conformance/resolvesWithoutExportsDiagnostic1(moduleresolution=node16).trace.json index ce0c4345da4..553b5f4bdf5 100644 --- a/testdata/baselines/reference/submodule/conformance/resolvesWithoutExportsDiagnostic1(moduleresolution=node16).trace.json +++ b/testdata/baselines/reference/submodule/conformance/resolvesWithoutExportsDiagnostic1(moduleresolution=node16).trace.json @@ -98,13 +98,3 @@ File '/node_modules/@types/bar/index.d.ts' exists - use it as a name resolution 'package.json' does not have a 'peerDependencies' field. Resolving real path for '/node_modules/@types/bar/index.d.ts', result '/node_modules/@types/bar/index.d.ts'. ======== Module name 'bar' was successfully resolved to '/node_modules/bar/index.mjs' with Package ID 'bar/index.mjs@1.0.0'. ======== -======== Resolving type reference directive 'bar', containing file '/.src/__inferred type names__.ts', root directory '/.src/node_modules/@types,/node_modules/@types'. ======== -Resolving with primary search path '/.src/node_modules/@types, /node_modules/@types'. -Directory '/.src/node_modules/@types' does not exist, skipping all lookups in it. -File '/node_modules/@types/bar/package.json' exists according to earlier cached lookups. -'package.json' does not have a 'typesVersions' field. -'package.json' does not have a 'typings' field. -'package.json' has 'types' field 'index.d.ts' that references '/node_modules/@types/bar/index.d.ts'. -File '/node_modules/@types/bar/index.d.ts' exists - use it as a name resolution result. -Resolving real path for '/node_modules/@types/bar/index.d.ts', result '/node_modules/@types/bar/index.d.ts'. -======== Type reference directive 'bar' was successfully resolved to '/node_modules/@types/bar/index.d.ts', primary: true. ======== diff --git a/testdata/baselines/reference/submodule/conformance/templateStringInModuleName.errors.txt b/testdata/baselines/reference/submodule/conformance/templateStringInModuleName.errors.txt index 8bc71e48c3d..a691f3b30f5 100644 --- a/testdata/baselines/reference/submodule/conformance/templateStringInModuleName.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/templateStringInModuleName.errors.txt @@ -1,8 +1,8 @@ templateStringInModuleName.ts(1,1): error TS2304: Cannot find name 'declare'. -templateStringInModuleName.ts(1,9): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +templateStringInModuleName.ts(1,9): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. templateStringInModuleName.ts(1,16): error TS1443: Module declaration names may only use ' or " quoted strings. templateStringInModuleName.ts(4,1): error TS2304: Cannot find name 'declare'. -templateStringInModuleName.ts(4,9): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +templateStringInModuleName.ts(4,9): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. templateStringInModuleName.ts(4,16): error TS1443: Module declaration names may only use ' or " quoted strings. @@ -11,7 +11,7 @@ templateStringInModuleName.ts(4,16): error TS1443: Module declaration names may ~~~~~~~ !!! error TS2304: Cannot find name 'declare'. ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ~~~~ !!! error TS1443: Module declaration names may only use ' or " quoted strings. } @@ -20,7 +20,7 @@ templateStringInModuleName.ts(4,16): error TS1443: Module declaration names may ~~~~~~~ !!! error TS2304: Cannot find name 'declare'. ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ~~~~~~~ !!! error TS1443: Module declaration names may only use ' or " quoted strings. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/templateStringInModuleName.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/templateStringInModuleName.errors.txt.diff deleted file mode 100644 index 428703c5fdc..00000000000 --- a/testdata/baselines/reference/submodule/conformance/templateStringInModuleName.errors.txt.diff +++ /dev/null @@ -1,31 +0,0 @@ ---- old.templateStringInModuleName.errors.txt -+++ new.templateStringInModuleName.errors.txt -@@= skipped -0, +0 lines =@@ - templateStringInModuleName.ts(1,1): error TS2304: Cannot find name 'declare'. --templateStringInModuleName.ts(1,9): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+templateStringInModuleName.ts(1,9): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - templateStringInModuleName.ts(1,16): error TS1443: Module declaration names may only use ' or " quoted strings. - templateStringInModuleName.ts(4,1): error TS2304: Cannot find name 'declare'. --templateStringInModuleName.ts(4,9): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+templateStringInModuleName.ts(4,9): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - templateStringInModuleName.ts(4,16): error TS1443: Module declaration names may only use ' or " quoted strings. - - -@@= skipped -10, +10 lines =@@ - ~~~~~~~ - !!! error TS2304: Cannot find name 'declare'. - ~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - ~~~~ - !!! error TS1443: Module declaration names may only use ' or " quoted strings. - } -@@= skipped -9, +9 lines =@@ - ~~~~~~~ - !!! error TS2304: Cannot find name 'declare'. - ~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - ~~~~~~~ - !!! error TS1443: Module declaration names may only use ' or " quoted strings. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/templateStringInModuleNameES6.errors.txt b/testdata/baselines/reference/submodule/conformance/templateStringInModuleNameES6.errors.txt index 889daa0f75c..180a8d7e659 100644 --- a/testdata/baselines/reference/submodule/conformance/templateStringInModuleNameES6.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/templateStringInModuleNameES6.errors.txt @@ -1,8 +1,8 @@ templateStringInModuleNameES6.ts(1,1): error TS2304: Cannot find name 'declare'. -templateStringInModuleNameES6.ts(1,9): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +templateStringInModuleNameES6.ts(1,9): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. templateStringInModuleNameES6.ts(1,16): error TS1443: Module declaration names may only use ' or " quoted strings. templateStringInModuleNameES6.ts(4,1): error TS2304: Cannot find name 'declare'. -templateStringInModuleNameES6.ts(4,9): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +templateStringInModuleNameES6.ts(4,9): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. templateStringInModuleNameES6.ts(4,16): error TS1443: Module declaration names may only use ' or " quoted strings. @@ -11,7 +11,7 @@ templateStringInModuleNameES6.ts(4,16): error TS1443: Module declaration names m ~~~~~~~ !!! error TS2304: Cannot find name 'declare'. ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ~~~~ !!! error TS1443: Module declaration names may only use ' or " quoted strings. } @@ -20,7 +20,7 @@ templateStringInModuleNameES6.ts(4,16): error TS1443: Module declaration names m ~~~~~~~ !!! error TS2304: Cannot find name 'declare'. ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ~~~~~~~ !!! error TS1443: Module declaration names may only use ' or " quoted strings. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/templateStringInModuleNameES6.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/templateStringInModuleNameES6.errors.txt.diff deleted file mode 100644 index 9a79ecdce5e..00000000000 --- a/testdata/baselines/reference/submodule/conformance/templateStringInModuleNameES6.errors.txt.diff +++ /dev/null @@ -1,31 +0,0 @@ ---- old.templateStringInModuleNameES6.errors.txt -+++ new.templateStringInModuleNameES6.errors.txt -@@= skipped -0, +0 lines =@@ - templateStringInModuleNameES6.ts(1,1): error TS2304: Cannot find name 'declare'. --templateStringInModuleNameES6.ts(1,9): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+templateStringInModuleNameES6.ts(1,9): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - templateStringInModuleNameES6.ts(1,16): error TS1443: Module declaration names may only use ' or " quoted strings. - templateStringInModuleNameES6.ts(4,1): error TS2304: Cannot find name 'declare'. --templateStringInModuleNameES6.ts(4,9): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+templateStringInModuleNameES6.ts(4,9): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - templateStringInModuleNameES6.ts(4,16): error TS1443: Module declaration names may only use ' or " quoted strings. - - -@@= skipped -10, +10 lines =@@ - ~~~~~~~ - !!! error TS2304: Cannot find name 'declare'. - ~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - ~~~~ - !!! error TS1443: Module declaration names may only use ' or " quoted strings. - } -@@= skipped -9, +9 lines =@@ - ~~~~~~~ - !!! error TS2304: Cannot find name 'declare'. - ~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - ~~~~~~~ - !!! error TS1443: Module declaration names may only use ' or " quoted strings. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment37.errors.txt b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment37.errors.txt index db8ede3fef3..b10b2af7b6b 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment37.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment37.errors.txt @@ -1,5 +1,5 @@ mod.js(1,14): error TS2304: Cannot find name 'exports'. -mod.js(1,24): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +mod.js(1,24): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. use.js(1,22): error TS2306: File 'mod.js' is not a module. @@ -17,7 +17,7 @@ use.js(1,22): error TS2306: File 'mod.js' is not a module. ~~~~~~~ !!! error TS2304: Cannot find name 'exports'. ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. if (!!false) { util.existy = function () { } } diff --git a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment37.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment37.errors.txt.diff index 4c08740d66e..668b62c93ba 100644 --- a/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment37.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment37.errors.txt.diff @@ -3,7 +3,7 @@ @@= skipped -0, +0 lines =@@ - +mod.js(1,14): error TS2304: Cannot find name 'exports'. -+mod.js(1,24): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. ++mod.js(1,24): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. +use.js(1,22): error TS2306: File 'mod.js' is not a module. + + @@ -21,7 +21,7 @@ + ~~~~~~~ +!!! error TS2304: Cannot find name 'exports'. + ~~~~~~ -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. ++!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. + if (!!false) { + util.existy = function () { } + } diff --git a/testdata/baselines/reference/submodule/conformance/typingsLookup1.trace.json b/testdata/baselines/reference/submodule/conformance/typingsLookup1.trace.json index 4960bf5610c..42432a13dad 100644 --- a/testdata/baselines/reference/submodule/conformance/typingsLookup1.trace.json +++ b/testdata/baselines/reference/submodule/conformance/typingsLookup1.trace.json @@ -4,9 +4,3 @@ File '/node_modules/@types/jquery/package.json' does not exist. File '/node_modules/@types/jquery/index.d.ts' exists - use it as a name resolution result. Resolving real path for '/node_modules/@types/jquery/index.d.ts', result '/node_modules/@types/jquery/index.d.ts'. ======== Type reference directive 'jquery' was successfully resolved to '/node_modules/@types/jquery/index.d.ts', primary: true. ======== -======== Resolving type reference directive 'jquery', containing file '/__inferred type names__.ts', root directory '/node_modules/@types'. ======== -Resolving with primary search path '/node_modules/@types'. -File '/node_modules/@types/jquery/package.json' does not exist according to earlier cached lookups. -File '/node_modules/@types/jquery/index.d.ts' exists - use it as a name resolution result. -Resolving real path for '/node_modules/@types/jquery/index.d.ts', result '/node_modules/@types/jquery/index.d.ts'. -======== Type reference directive 'jquery' was successfully resolved to '/node_modules/@types/jquery/index.d.ts', primary: true. ======== diff --git a/testdata/baselines/reference/submodule/conformance/typingsLookup3.errors.txt b/testdata/baselines/reference/submodule/conformance/typingsLookup3.errors.txt index 11b8a93f7c8..5073cb54939 100644 --- a/testdata/baselines/reference/submodule/conformance/typingsLookup3.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typingsLookup3.errors.txt @@ -1,17 +1,14 @@ /a.ts(1,23): error TS2688: Cannot find type definition file for 'JqUeRy'. -/a.ts(2,1): error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. ==== /tsconfig.json (0 errors) ==== { "files": "a.ts" } -==== /a.ts (2 errors) ==== +==== /a.ts (1 errors) ==== /// ~~~~~~ !!! error TS2688: Cannot find type definition file for 'JqUeRy'. $.x; - ~ -!!! error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. ==== /node_modules/@types/jquery/index.d.ts (0 errors) ==== declare var $: { x: any }; diff --git a/testdata/baselines/reference/submodule/conformance/typingsLookup3.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/typingsLookup3.errors.txt.diff deleted file mode 100644 index 845f9698eb2..00000000000 --- a/testdata/baselines/reference/submodule/conformance/typingsLookup3.errors.txt.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.typingsLookup3.errors.txt -+++ new.typingsLookup3.errors.txt -@@= skipped -0, +0 lines =@@ - /a.ts(1,23): error TS2688: Cannot find type definition file for 'JqUeRy'. -+/a.ts(2,1): error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. - - - ==== /tsconfig.json (0 errors) ==== - { "files": "a.ts" } - --==== /a.ts (1 errors) ==== -+==== /a.ts (2 errors) ==== - /// - ~~~~~~ - !!! error TS2688: Cannot find type definition file for 'JqUeRy'. - $.x; -+ ~ -+!!! error TS2592: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig. - - ==== /node_modules/@types/jquery/index.d.ts (0 errors) ==== - declare var $: { x: any }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/typingsLookup3.symbols b/testdata/baselines/reference/submodule/conformance/typingsLookup3.symbols index e677900ded5..743c42a1b80 100644 --- a/testdata/baselines/reference/submodule/conformance/typingsLookup3.symbols +++ b/testdata/baselines/reference/submodule/conformance/typingsLookup3.symbols @@ -1,7 +1,14 @@ //// [tests/cases/conformance/typings/typingsLookup3.ts] //// === /a.ts === - /// $.x; +>$.x : Symbol(x, Decl(index.d.ts, 0, 16)) +>$ : Symbol($, Decl(index.d.ts, 0, 11)) +>x : Symbol(x, Decl(index.d.ts, 0, 16)) + +=== /node_modules/@types/jquery/index.d.ts === +declare var $: { x: any }; +>$ : Symbol($, Decl(index.d.ts, 0, 11)) +>x : Symbol(x, Decl(index.d.ts, 0, 16)) diff --git a/testdata/baselines/reference/submodule/conformance/typingsLookup3.symbols.diff b/testdata/baselines/reference/submodule/conformance/typingsLookup3.symbols.diff deleted file mode 100644 index 9372e57b7d5..00000000000 --- a/testdata/baselines/reference/submodule/conformance/typingsLookup3.symbols.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.typingsLookup3.symbols -+++ new.typingsLookup3.symbols -@@= skipped -0, +0 lines =@@ - //// [tests/cases/conformance/typings/typingsLookup3.ts] //// - - === /a.ts === -+ - /// - $.x; -->$.x : Symbol(x, Decl(index.d.ts, 0, 16)) -->$ : Symbol($, Decl(index.d.ts, 0, 11)) -->x : Symbol(x, Decl(index.d.ts, 0, 16)) -- --=== /node_modules/@types/jquery/index.d.ts === --declare var $: { x: any }; -->$ : Symbol($, Decl(index.d.ts, 0, 11)) -->x : Symbol(x, Decl(index.d.ts, 0, 16)) diff --git a/testdata/baselines/reference/submodule/conformance/typingsLookup3.trace.json b/testdata/baselines/reference/submodule/conformance/typingsLookup3.trace.json index bb005c0def6..9957e4d2ce7 100644 --- a/testdata/baselines/reference/submodule/conformance/typingsLookup3.trace.json +++ b/testdata/baselines/reference/submodule/conformance/typingsLookup3.trace.json @@ -5,10 +5,9 @@ Searching all ancestor node_modules directories for preferred extensions: Declar File '/node_modules/JqUeRy.d.ts' does not exist. File '/node_modules/@types/JqUeRy.d.ts' does not exist. ======== Type reference directive 'JqUeRy' was not resolved. ======== -======== Resolving type reference directive '*', containing file '/__inferred type names__.ts', root directory '/node_modules/@types'. ======== +======== Resolving type reference directive 'jquery', containing file '/__inferred type names__.ts', root directory '/node_modules/@types'. ======== Resolving with primary search path '/node_modules/@types'. -Looking up in 'node_modules' folder, initial location '/'. -Searching all ancestor node_modules directories for preferred extensions: Declaration. -File '/node_modules/*.d.ts' does not exist. -File '/node_modules/@types/*.d.ts' does not exist. -======== Type reference directive '*' was not resolved. ======== +File '/node_modules/@types/jquery/package.json' does not exist. +File '/node_modules/@types/jquery/index.d.ts' exists - use it as a name resolution result. +Resolving real path for '/node_modules/@types/jquery/index.d.ts', result '/node_modules/@types/jquery/index.d.ts'. +======== Type reference directive 'jquery' was successfully resolved to '/node_modules/@types/jquery/index.d.ts', primary: true. ======== diff --git a/testdata/baselines/reference/submodule/conformance/typingsLookup3.types b/testdata/baselines/reference/submodule/conformance/typingsLookup3.types index 7a9f05c0321..5a8264a2f1e 100644 --- a/testdata/baselines/reference/submodule/conformance/typingsLookup3.types +++ b/testdata/baselines/reference/submodule/conformance/typingsLookup3.types @@ -4,6 +4,11 @@ /// $.x; >$.x : any ->$ : any +>$ : { x: any; } +>x : any + +=== /node_modules/@types/jquery/index.d.ts === +declare var $: { x: any }; +>$ : { x: any; } >x : any diff --git a/testdata/baselines/reference/submodule/conformance/typingsLookup3.types.diff b/testdata/baselines/reference/submodule/conformance/typingsLookup3.types.diff deleted file mode 100644 index 6e317240e27..00000000000 --- a/testdata/baselines/reference/submodule/conformance/typingsLookup3.types.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.typingsLookup3.types -+++ new.typingsLookup3.types -@@= skipped -3, +3 lines =@@ - /// - $.x; - >$.x : any -->$ : { x: any; } -->x : any -- --=== /node_modules/@types/jquery/index.d.ts === --declare var $: { x: any }; -->$ : { x: any; } -+>$ : any - >x : any diff --git a/testdata/baselines/reference/submodule/conformance/typingsLookup4.trace.json b/testdata/baselines/reference/submodule/conformance/typingsLookup4.trace.json index 908679d09ea..d3e6759471f 100644 --- a/testdata/baselines/reference/submodule/conformance/typingsLookup4.trace.json +++ b/testdata/baselines/reference/submodule/conformance/typingsLookup4.trace.json @@ -71,44 +71,3 @@ File '/node_modules/@types/mquery/mquery/index.ts' does not exist. File '/node_modules/@types/mquery/mquery/index.tsx' exists - use it as a name resolution result. Resolving real path for '/node_modules/@types/mquery/mquery/index.tsx', result '/node_modules/@types/mquery/mquery/index.tsx'. ======== Module name 'mquery' was successfully resolved to '/node_modules/@types/mquery/mquery/index.tsx'. ======== -======== Resolving type reference directive 'jquery', containing file '/__inferred type names__.ts', root directory '/node_modules/@types'. ======== -Resolving with primary search path '/node_modules/@types'. -File '/node_modules/@types/jquery/package.json' exists according to earlier cached lookups. -'package.json' does not have a 'typesVersions' field. -'package.json' has 'typings' field 'jquery.d.ts' that references '/node_modules/@types/jquery/jquery.d.ts'. -File '/node_modules/@types/jquery/jquery.d.ts' exists - use it as a name resolution result. -Resolving real path for '/node_modules/@types/jquery/jquery.d.ts', result '/node_modules/@types/jquery/jquery.d.ts'. -======== Type reference directive 'jquery' was successfully resolved to '/node_modules/@types/jquery/jquery.d.ts', primary: true. ======== -======== Resolving type reference directive 'kquery', containing file '/__inferred type names__.ts', root directory '/node_modules/@types'. ======== -Resolving with primary search path '/node_modules/@types'. -File '/node_modules/@types/kquery/package.json' exists according to earlier cached lookups. -'package.json' does not have a 'typesVersions' field. -'package.json' has 'typings' field 'kquery' that references '/node_modules/@types/kquery/kquery'. -Loading module as file / folder, candidate module location '/node_modules/@types/kquery/kquery', target file types: TypeScript, Declaration. -File '/node_modules/@types/kquery/kquery.ts' does not exist according to earlier cached lookups. -File '/node_modules/@types/kquery/kquery.tsx' does not exist according to earlier cached lookups. -File '/node_modules/@types/kquery/kquery.d.ts' exists - use it as a name resolution result. -Resolving real path for '/node_modules/@types/kquery/kquery.d.ts', result '/node_modules/@types/kquery/kquery.d.ts'. -======== Type reference directive 'kquery' was successfully resolved to '/node_modules/@types/kquery/kquery.d.ts', primary: true. ======== -======== Resolving type reference directive 'lquery', containing file '/__inferred type names__.ts', root directory '/node_modules/@types'. ======== -Resolving with primary search path '/node_modules/@types'. -File '/node_modules/@types/lquery/package.json' exists according to earlier cached lookups. -'package.json' does not have a 'typesVersions' field. -'package.json' has 'typings' field 'lquery' that references '/node_modules/@types/lquery/lquery'. -Loading module as file / folder, candidate module location '/node_modules/@types/lquery/lquery', target file types: TypeScript, Declaration. -File '/node_modules/@types/lquery/lquery.ts' exists - use it as a name resolution result. -Resolving real path for '/node_modules/@types/lquery/lquery.ts', result '/node_modules/@types/lquery/lquery.ts'. -======== Type reference directive 'lquery' was successfully resolved to '/node_modules/@types/lquery/lquery.ts', primary: true. ======== -======== Resolving type reference directive 'mquery', containing file '/__inferred type names__.ts', root directory '/node_modules/@types'. ======== -Resolving with primary search path '/node_modules/@types'. -File '/node_modules/@types/mquery/package.json' exists according to earlier cached lookups. -'package.json' does not have a 'typesVersions' field. -'package.json' has 'typings' field 'mquery' that references '/node_modules/@types/mquery/mquery'. -Loading module as file / folder, candidate module location '/node_modules/@types/mquery/mquery', target file types: TypeScript, Declaration. -File '/node_modules/@types/mquery/mquery.ts' does not exist according to earlier cached lookups. -File '/node_modules/@types/mquery/mquery.tsx' does not exist according to earlier cached lookups. -File '/node_modules/@types/mquery/mquery.d.ts' does not exist according to earlier cached lookups. -File '/node_modules/@types/mquery/mquery/index.ts' does not exist according to earlier cached lookups. -File '/node_modules/@types/mquery/mquery/index.tsx' exists - use it as a name resolution result. -Resolving real path for '/node_modules/@types/mquery/mquery/index.tsx', result '/node_modules/@types/mquery/mquery/index.tsx'. -======== Type reference directive 'mquery' was successfully resolved to '/node_modules/@types/mquery/mquery/index.tsx', primary: true. ======== diff --git a/testdata/baselines/reference/submodule/conformance/typingsSuggestion2.errors.txt b/testdata/baselines/reference/submodule/conformance/typingsSuggestion2.errors.txt index c166630f3d5..0e77b575542 100644 --- a/testdata/baselines/reference/submodule/conformance/typingsSuggestion2.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typingsSuggestion2.errors.txt @@ -1,4 +1,4 @@ -a.ts(1,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +a.ts(1,1): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. ==== tsconfig.json (0 errors) ==== @@ -7,5 +7,5 @@ a.ts(1,1): error TS2580: Cannot find name 'module'. Do you need to install type ==== a.ts (1 errors) ==== module.exports = 1; ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/typingsSuggestion2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/typingsSuggestion2.errors.txt.diff deleted file mode 100644 index 78e6534e60c..00000000000 --- a/testdata/baselines/reference/submodule/conformance/typingsSuggestion2.errors.txt.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- old.typingsSuggestion2.errors.txt -+++ new.typingsSuggestion2.errors.txt -@@= skipped -0, +0 lines =@@ --a.ts(1,1): error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+a.ts(1,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - - - ==== tsconfig.json (0 errors) ==== -@@= skipped -6, +6 lines =@@ - ==== a.ts (1 errors) ==== - module.exports = 1; - ~~~~~~ --!!! error TS2591: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig. -+!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/typingsSuggestionBun2.errors.txt b/testdata/baselines/reference/submodule/conformance/typingsSuggestionBun2.errors.txt index 309dc7e05b3..ff8eedab8ab 100644 --- a/testdata/baselines/reference/submodule/conformance/typingsSuggestionBun2.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typingsSuggestionBun2.errors.txt @@ -1,4 +1,4 @@ -a.ts(1,14): error TS2867: Cannot find name 'Bun'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun`. +a.ts(1,14): error TS2868: Cannot find name 'Bun'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun` and then add 'bun' to the types field in your tsconfig. ==== tsconfig.json (0 errors) ==== @@ -7,5 +7,5 @@ a.ts(1,14): error TS2867: Cannot find name 'Bun'. Do you need to install type de ==== a.ts (1 errors) ==== const file = Bun.file("/a.ts"); ~~~ -!!! error TS2867: Cannot find name 'Bun'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun`. +!!! error TS2868: Cannot find name 'Bun'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun` and then add 'bun' to the types field in your tsconfig. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/typingsSuggestionBun2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/typingsSuggestionBun2.errors.txt.diff deleted file mode 100644 index a583f1ee561..00000000000 --- a/testdata/baselines/reference/submodule/conformance/typingsSuggestionBun2.errors.txt.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- old.typingsSuggestionBun2.errors.txt -+++ new.typingsSuggestionBun2.errors.txt -@@= skipped -0, +0 lines =@@ --a.ts(1,14): error TS2868: Cannot find name 'Bun'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun` and then add 'bun' to the types field in your tsconfig. -+a.ts(1,14): error TS2867: Cannot find name 'Bun'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun`. - - - ==== tsconfig.json (0 errors) ==== -@@= skipped -6, +6 lines =@@ - ==== a.ts (1 errors) ==== - const file = Bun.file("/a.ts"); - ~~~ --!!! error TS2868: Cannot find name 'Bun'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun` and then add 'bun' to the types field in your tsconfig. -+!!! error TS2867: Cannot find name 'Bun'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun`. - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/fourslash/findAllReferences/findAllReferencesUmdModuleAsGlobalConst.baseline.jsonc b/testdata/baselines/reference/submodule/fourslash/findAllReferences/findAllReferencesUmdModuleAsGlobalConst.baseline.jsonc index e6b3049cf98..63169a81fa1 100644 --- a/testdata/baselines/reference/submodule/fourslash/findAllReferences/findAllReferencesUmdModuleAsGlobalConst.baseline.jsonc +++ b/testdata/baselines/reference/submodule/fourslash/findAllReferences/findAllReferencesUmdModuleAsGlobalConst.baseline.jsonc @@ -6,10 +6,6 @@ // === findAllReferences === -// === /node_modules/@types/three/index.d.ts === -// export * from "[|./three-core|]"; -// export as namespace THREE; - // === /typings/global.d.ts === // import * as _THREE from '/*FIND ALL REFS*/[|three|]'; // declare global { diff --git a/testdata/baselines/reference/submodule/fourslash/findAllReferences/findAllReferencesUmdModuleAsGlobalConst.baseline.jsonc.diff b/testdata/baselines/reference/submodule/fourslash/findAllReferences/findAllReferencesUmdModuleAsGlobalConst.baseline.jsonc.diff deleted file mode 100644 index 40f42e2500a..00000000000 --- a/testdata/baselines/reference/submodule/fourslash/findAllReferences/findAllReferencesUmdModuleAsGlobalConst.baseline.jsonc.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- old.findAllReferencesUmdModuleAsGlobalConst.baseline.jsonc -+++ new.findAllReferencesUmdModuleAsGlobalConst.baseline.jsonc -@@= skipped -5, +5 lines =@@ - - - // === findAllReferences === -+// === /node_modules/@types/three/index.d.ts === -+// export * from "[|./three-core|]"; -+// export as namespace THREE; -+ - // === /typings/global.d.ts === - // import * as _THREE from '/*FIND ALL REFS*/[|three|]'; - // declare global { \ No newline at end of file diff --git a/testdata/baselines/reference/tsbuild/libraryResolution/with-config-with-libReplacement.js b/testdata/baselines/reference/tsbuild/libraryResolution/with-config-with-libReplacement.js index 7022462c94d..40a076d6e69 100644 --- a/testdata/baselines/reference/tsbuild/libraryResolution/with-config-with-libReplacement.js +++ b/testdata/baselines/reference/tsbuild/libraryResolution/with-config-with-libReplacement.js @@ -138,13 +138,6 @@ Output:: [HH:MM:SS AM] Building project 'project1/tsconfig.json'... -======== Resolving type reference directive 'sometype', containing file '/home/src/workspace/projects/project1/__inferred type names__.ts', root directory '/home/src/workspace/projects/project1/typeroot1'. ======== -Resolving with primary search path '/home/src/workspace/projects/project1/typeroot1'. -File '/home/src/workspace/projects/project1/typeroot1/sometype.d.ts' does not exist. -File '/home/src/workspace/projects/project1/typeroot1/sometype/package.json' does not exist. -File '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts' exists - use it as a name resolution result. -Resolving real path for '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts', result '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts'. -======== Type reference directive 'sometype' was successfully resolved to '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts', primary: true. ======== ======== Resolving module '@typescript/lib-dom' from '/home/src/workspace/projects/project1/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ======== Module resolution kind is not specified, using 'Bundler'. Resolving in CJS mode with conditions 'require', 'types'. @@ -258,7 +251,6 @@ project1/utils.d.ts Matched by default include pattern '**/*' project1/typeroot1/sometype/index.d.ts Matched by default include pattern '**/*' - Entry point for implicit type library 'sometype' [HH:MM:SS AM] Project 'project2/tsconfig.json' is out of date because output file 'project2/tsconfig.tsbuildinfo' does not exist [HH:MM:SS AM] Building project 'project2/tsconfig.json'... diff --git a/testdata/baselines/reference/tsbuild/libraryResolution/with-config.js b/testdata/baselines/reference/tsbuild/libraryResolution/with-config.js index cbeae0955d6..656df587239 100644 --- a/testdata/baselines/reference/tsbuild/libraryResolution/with-config.js +++ b/testdata/baselines/reference/tsbuild/libraryResolution/with-config.js @@ -86,13 +86,6 @@ Output:: [HH:MM:SS AM] Building project 'project1/tsconfig.json'... -======== Resolving type reference directive 'sometype', containing file '/home/src/workspace/projects/project1/__inferred type names__.ts', root directory '/home/src/workspace/projects/project1/typeroot1'. ======== -Resolving with primary search path '/home/src/workspace/projects/project1/typeroot1'. -File '/home/src/workspace/projects/project1/typeroot1/sometype.d.ts' does not exist. -File '/home/src/workspace/projects/project1/typeroot1/sometype/package.json' does not exist. -File '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts' exists - use it as a name resolution result. -Resolving real path for '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts', result '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts'. -======== Type reference directive 'sometype' was successfully resolved to '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts', primary: true. ======== ../../tslibs/TS/Lib/lib.es5.d.ts Library referenced via 'es5' from file 'project1/file2.ts' Library 'lib.es5.d.ts' specified in compilerOptions @@ -114,7 +107,6 @@ project1/utils.d.ts Matched by default include pattern '**/*' project1/typeroot1/sometype/index.d.ts Matched by default include pattern '**/*' - Entry point for implicit type library 'sometype' [HH:MM:SS AM] Project 'project2/tsconfig.json' is out of date because output file 'project2/tsconfig.tsbuildinfo' does not exist [HH:MM:SS AM] Building project 'project2/tsconfig.json'... diff --git a/testdata/baselines/reference/tsbuild/moduleResolution/impliedNodeFormat-differs-between-projects-for-shared-file.js b/testdata/baselines/reference/tsbuild/moduleResolution/impliedNodeFormat-differs-between-projects-for-shared-file.js index cbec024bc3c..73a2f4411ea 100644 --- a/testdata/baselines/reference/tsbuild/moduleResolution/impliedNodeFormat-differs-between-projects-for-shared-file.js +++ b/testdata/baselines/reference/tsbuild/moduleResolution/impliedNodeFormat-differs-between-projects-for-shared-file.js @@ -43,22 +43,10 @@ Output:: [HH:MM:SS AM] Building project 'a/tsconfig.json'... -======== Resolving type reference directive 'pg', containing file '/home/src/workspaces/project/a/__inferred type names__.ts', root directory '/home/src/workspaces/project/a/node_modules/@types,/home/src/workspaces/project/node_modules/@types,/home/src/workspaces/node_modules/@types,/home/src/node_modules/@types,/home/node_modules/@types,/node_modules/@types'. ======== -Resolving with primary search path '/home/src/workspaces/project/a/node_modules/@types, /home/src/workspaces/project/node_modules/@types, /home/src/workspaces/node_modules/@types, /home/src/node_modules/@types, /home/node_modules/@types, /node_modules/@types'. -Directory '/home/src/workspaces/project/a/node_modules/@types' does not exist, skipping all lookups in it. -Found 'package.json' at '/home/src/workspaces/project/node_modules/@types/pg/package.json'. -'package.json' does not have a 'typesVersions' field. -'package.json' does not have a 'typings' field. -'package.json' has 'types' field 'index.d.ts' that references '/home/src/workspaces/project/node_modules/@types/pg/index.d.ts'. -File '/home/src/workspaces/project/node_modules/@types/pg/index.d.ts' exists - use it as a name resolution result. -Resolving real path for '/home/src/workspaces/project/node_modules/@types/pg/index.d.ts', result '/home/src/workspaces/project/node_modules/@types/pg/index.d.ts'. -======== Type reference directive 'pg' was successfully resolved to '/home/src/workspaces/project/node_modules/@types/pg/index.d.ts', primary: true. ======== ../../tslibs/TS/Lib/lib.es2025.full.d.ts Default library for target 'ES2025' a/src/index.ts Matched by default include pattern '**/*' -node_modules/@types/pg/index.d.ts - Entry point for implicit type library 'pg' [HH:MM:SS AM] Project 'b/tsconfig.json' is out of date because output file 'b/tsconfig.tsbuildinfo' does not exist [HH:MM:SS AM] Building project 'b/tsconfig.json'... @@ -81,21 +69,10 @@ Found 'package.json' at '/home/src/workspaces/project/node_modules/@types/pg/pac File '/home/src/workspaces/project/node_modules/@types/pg/index.d.ts' exists - use it as a name resolution result. Resolving real path for '/home/src/workspaces/project/node_modules/@types/pg/index.d.ts', result '/home/src/workspaces/project/node_modules/@types/pg/index.d.ts'. ======== Module name 'pg' was successfully resolved to '/home/src/workspaces/project/node_modules/@types/pg/index.d.ts'. ======== -======== Resolving type reference directive 'pg', containing file '/home/src/workspaces/project/b/__inferred type names__.ts', root directory '/home/src/workspaces/project/b/node_modules/@types,/home/src/workspaces/project/node_modules/@types,/home/src/workspaces/node_modules/@types,/home/src/node_modules/@types,/home/node_modules/@types,/node_modules/@types'. ======== -Resolving with primary search path '/home/src/workspaces/project/b/node_modules/@types, /home/src/workspaces/project/node_modules/@types, /home/src/workspaces/node_modules/@types, /home/src/node_modules/@types, /home/node_modules/@types, /node_modules/@types'. -Directory '/home/src/workspaces/project/b/node_modules/@types' does not exist, skipping all lookups in it. -Found 'package.json' at '/home/src/workspaces/project/node_modules/@types/pg/package.json'. -'package.json' does not have a 'typesVersions' field. -'package.json' does not have a 'typings' field. -'package.json' has 'types' field 'index.d.ts' that references '/home/src/workspaces/project/node_modules/@types/pg/index.d.ts'. -File '/home/src/workspaces/project/node_modules/@types/pg/index.d.ts' exists - use it as a name resolution result. -Resolving real path for '/home/src/workspaces/project/node_modules/@types/pg/index.d.ts', result '/home/src/workspaces/project/node_modules/@types/pg/index.d.ts'. -======== Type reference directive 'pg' was successfully resolved to '/home/src/workspaces/project/node_modules/@types/pg/index.d.ts', primary: true. ======== ../../tslibs/TS/Lib/lib.es2025.full.d.ts Default library for target 'ES2025' node_modules/@types/pg/index.d.ts Imported via "pg" from file 'b/src/index.ts' - Entry point for implicit type library 'pg' File is CommonJS module because 'node_modules/@types/pg/package.json' does not have field "type" b/src/index.ts Matched by default include pattern '**/*' @@ -165,7 +142,6 @@ a/tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts *refresh* /home/src/workspaces/project/a/src/index.ts -*refresh* /home/src/workspaces/project/node_modules/@types/pg/index.d.ts Signatures:: b/tsconfig.json:: diff --git a/testdata/baselines/reference/tsbuild/moduleResolution/type-reference-resolution-uses-correct-options-for-different-resolution-options-referenced-project.js b/testdata/baselines/reference/tsbuild/moduleResolution/type-reference-resolution-uses-correct-options-for-different-resolution-options-referenced-project.js index 675dbbd74ba..c68a7633b6c 100644 --- a/testdata/baselines/reference/tsbuild/moduleResolution/type-reference-resolution-uses-correct-options-for-different-resolution-options-referenced-project.js +++ b/testdata/baselines/reference/tsbuild/moduleResolution/type-reference-resolution-uses-correct-options-for-different-resolution-options-referenced-project.js @@ -27,7 +27,7 @@ declare type TheNum = "type1"; declare type TheNum2 = "type2"; tsgo -b packages/pkg1.tsconfig.json packages/pkg2.tsconfig.json --verbose --traceResolution -ExitStatus:: Success +ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: [HH:MM:SS AM] Projects in this build: * packages/pkg1.tsconfig.json @@ -37,24 +37,27 @@ Output:: [HH:MM:SS AM] Building project 'packages/pkg1.tsconfig.json'... -======== Resolving type reference directive 'sometype', containing file '/home/src/workspaces/project/packages/__inferred type names__.ts', root directory '/home/src/workspaces/project/packages/typeroot1'. ======== -Resolving with primary search path '/home/src/workspaces/project/packages/typeroot1'. -File '/home/src/workspaces/project/packages/typeroot1/sometype.d.ts' does not exist. -File '/home/src/workspaces/project/packages/typeroot1/sometype/package.json' does not exist. -File '/home/src/workspaces/project/packages/typeroot1/sometype/index.d.ts' exists - use it as a name resolution result. -Resolving real path for '/home/src/workspaces/project/packages/typeroot1/sometype/index.d.ts', result '/home/src/workspaces/project/packages/typeroot1/sometype/index.d.ts'. -======== Type reference directive 'sometype' was successfully resolved to '/home/src/workspaces/project/packages/typeroot1/sometype/index.d.ts', primary: true. ======== +packages/pkg1_index.ts:1:22 - error TS2304: Cannot find name 'TheNum'. + +1 export const theNum: TheNum = "type1"; +   ~~~~~~ + [HH:MM:SS AM] Project 'packages/pkg2.tsconfig.json' is out of date because output file 'packages/pkg2.tsconfig.tsbuildinfo' does not exist [HH:MM:SS AM] Building project 'packages/pkg2.tsconfig.json'... -======== Resolving type reference directive 'sometype', containing file '/home/src/workspaces/project/packages/__inferred type names__.ts', root directory '/home/src/workspaces/project/packages/typeroot2'. ======== -Resolving with primary search path '/home/src/workspaces/project/packages/typeroot2'. -File '/home/src/workspaces/project/packages/typeroot2/sometype.d.ts' does not exist. -File '/home/src/workspaces/project/packages/typeroot2/sometype/package.json' does not exist. -File '/home/src/workspaces/project/packages/typeroot2/sometype/index.d.ts' exists - use it as a name resolution result. -Resolving real path for '/home/src/workspaces/project/packages/typeroot2/sometype/index.d.ts', result '/home/src/workspaces/project/packages/typeroot2/sometype/index.d.ts'. -======== Type reference directive 'sometype' was successfully resolved to '/home/src/workspaces/project/packages/typeroot2/sometype/index.d.ts', primary: true. ======== +packages/pkg2_index.ts:1:22 - error TS2304: Cannot find name 'TheNum2'. + +1 export const theNum: TheNum2 = "type2"; +   ~~~~~~~ + + +Found 2 errors in 2 files. + +Errors Files + 1 packages/pkg1_index.ts:1 + 1 packages/pkg2_index.ts:1 + //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -79,7 +82,7 @@ interface Symbol { } declare const console: { log(msg: any): void; }; //// [/home/src/workspaces/project/packages/pkg1.tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2025.full.d.ts","./pkg1_index.ts","./typeroot1/sometype/index.d.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":"f4662ef3bd793790375f811e7f7d599f-export const theNum: TheNum = \"type1\";","signature":"dea6d3f907d93004db9004d6cea5698d-export declare const theNum: TheNum;\n","impliedNodeFormat":1},{"version":"74a6031362359bba204461bbf64bca2c-declare type TheNum = \"type1\";","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true},"latestChangedDtsFile":"./pkg1_index.d.ts"} +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2025.full.d.ts","./pkg1_index.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":"f4662ef3bd793790375f811e7f7d599f-export const theNum: TheNum = \"type1\";","signature":"dea6d3f907d93004db9004d6cea5698d-export declare const theNum: TheNum;\n","impliedNodeFormat":1}],"options":{"composite":true},"semanticDiagnosticsPerFile":[[2,[{"pos":21,"end":27,"code":2304,"category":1,"messageKey":"Cannot_find_name_0_2304","messageArgs":["TheNum"]}]]],"latestChangedDtsFile":"./pkg1_index.d.ts"} //// [/home/src/workspaces/project/packages/pkg1.tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", @@ -93,8 +96,7 @@ declare const console: { log(msg: any): void; }; ], "fileNames": [ "lib.es2025.full.d.ts", - "./pkg1_index.ts", - "./typeroot1/sometype/index.d.ts" + "./pkg1_index.ts" ], "fileInfos": [ { @@ -119,25 +121,30 @@ declare const console: { log(msg: any): void; }; "signature": "dea6d3f907d93004db9004d6cea5698d-export declare const theNum: TheNum;\n", "impliedNodeFormat": 1 } - }, - { - "fileName": "./typeroot1/sometype/index.d.ts", - "version": "74a6031362359bba204461bbf64bca2c-declare type TheNum = \"type1\";", - "signature": "74a6031362359bba204461bbf64bca2c-declare type TheNum = \"type1\";", - "affectsGlobalScope": true, - "impliedNodeFormat": "CommonJS", - "original": { - "version": "74a6031362359bba204461bbf64bca2c-declare type TheNum = \"type1\";", - "affectsGlobalScope": true, - "impliedNodeFormat": 1 - } } ], "options": { "composite": true }, + "semanticDiagnosticsPerFile": [ + [ + "./pkg1_index.ts", + [ + { + "pos": 21, + "end": 27, + "code": 2304, + "category": 1, + "messageKey": "Cannot_find_name_0_2304", + "messageArgs": [ + "TheNum" + ] + } + ] + ] + ], "latestChangedDtsFile": "./pkg1_index.d.ts", - "size": 1307 + "size": 1291 } //// [/home/src/workspaces/project/packages/pkg1_index.d.ts] *new* export declare const theNum: TheNum; @@ -146,7 +153,7 @@ export declare const theNum: TheNum; export const theNum = "type1"; //// [/home/src/workspaces/project/packages/pkg2.tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2025.full.d.ts","./pkg2_index.ts","./typeroot2/sometype/index.d.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":"5520638613ac947a47797c35d3ad9c4b-export const theNum: TheNum2 = \"type2\";","signature":"becc5ed6bddc5e1124b92e180d59b5e3-export declare const theNum: TheNum2;\n","impliedNodeFormat":1},{"version":"660a36a739fc0e581ff911c4d5604b0e-declare type TheNum2 = \"type2\";","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"composite":true},"latestChangedDtsFile":"./pkg2_index.d.ts"} +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2025.full.d.ts","./pkg2_index.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":"5520638613ac947a47797c35d3ad9c4b-export const theNum: TheNum2 = \"type2\";","signature":"becc5ed6bddc5e1124b92e180d59b5e3-export declare const theNum: TheNum2;\n","impliedNodeFormat":1}],"options":{"composite":true},"semanticDiagnosticsPerFile":[[2,[{"pos":21,"end":28,"code":2304,"category":1,"messageKey":"Cannot_find_name_0_2304","messageArgs":["TheNum2"]}]]],"latestChangedDtsFile":"./pkg2_index.d.ts"} //// [/home/src/workspaces/project/packages/pkg2.tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", @@ -160,8 +167,7 @@ export const theNum = "type1"; ], "fileNames": [ "lib.es2025.full.d.ts", - "./pkg2_index.ts", - "./typeroot2/sometype/index.d.ts" + "./pkg2_index.ts" ], "fileInfos": [ { @@ -186,25 +192,30 @@ export const theNum = "type1"; "signature": "becc5ed6bddc5e1124b92e180d59b5e3-export declare const theNum: TheNum2;\n", "impliedNodeFormat": 1 } - }, - { - "fileName": "./typeroot2/sometype/index.d.ts", - "version": "660a36a739fc0e581ff911c4d5604b0e-declare type TheNum2 = \"type2\";", - "signature": "660a36a739fc0e581ff911c4d5604b0e-declare type TheNum2 = \"type2\";", - "affectsGlobalScope": true, - "impliedNodeFormat": "CommonJS", - "original": { - "version": "660a36a739fc0e581ff911c4d5604b0e-declare type TheNum2 = \"type2\";", - "affectsGlobalScope": true, - "impliedNodeFormat": 1 - } } ], "options": { "composite": true }, + "semanticDiagnosticsPerFile": [ + [ + "./pkg2_index.ts", + [ + { + "pos": 21, + "end": 28, + "code": 2304, + "category": 1, + "messageKey": "Cannot_find_name_0_2304", + "messageArgs": [ + "TheNum2" + ] + } + ] + ] + ], "latestChangedDtsFile": "./pkg2_index.d.ts", - "size": 1310 + "size": 1294 } //// [/home/src/workspaces/project/packages/pkg2_index.d.ts] *new* export declare const theNum: TheNum2; @@ -217,7 +228,6 @@ packages/pkg1.tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts *refresh* /home/src/workspaces/project/packages/pkg1_index.ts -*refresh* /home/src/workspaces/project/packages/typeroot1/sometype/index.d.ts Signatures:: (stored at emit) /home/src/workspaces/project/packages/pkg1_index.ts @@ -225,6 +235,5 @@ packages/pkg2.tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts *refresh* /home/src/workspaces/project/packages/pkg2_index.ts -*refresh* /home/src/workspaces/project/packages/typeroot2/sometype/index.d.ts Signatures:: (stored at emit) /home/src/workspaces/project/packages/pkg2_index.ts diff --git a/testdata/baselines/reference/tsbuildWatch/libraryResolution/with-config-with-libReplacement.js b/testdata/baselines/reference/tsbuildWatch/libraryResolution/with-config-with-libReplacement.js index c2d7d4aa485..5c046dadee0 100644 --- a/testdata/baselines/reference/tsbuildWatch/libraryResolution/with-config-with-libReplacement.js +++ b/testdata/baselines/reference/tsbuildWatch/libraryResolution/with-config-with-libReplacement.js @@ -140,13 +140,6 @@ Output:: [HH:MM:SS AM] Building project 'project1/tsconfig.json'... -======== Resolving type reference directive 'sometype', containing file '/home/src/workspace/projects/project1/__inferred type names__.ts', root directory '/home/src/workspace/projects/project1/typeroot1'. ======== -Resolving with primary search path '/home/src/workspace/projects/project1/typeroot1'. -File '/home/src/workspace/projects/project1/typeroot1/sometype.d.ts' does not exist. -File '/home/src/workspace/projects/project1/typeroot1/sometype/package.json' does not exist. -File '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts' exists - use it as a name resolution result. -Resolving real path for '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts', result '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts'. -======== Type reference directive 'sometype' was successfully resolved to '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts', primary: true. ======== ======== Resolving module '@typescript/lib-dom' from '/home/src/workspace/projects/project1/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ======== Module resolution kind is not specified, using 'Bundler'. Resolving in CJS mode with conditions 'require', 'types'. @@ -260,7 +253,6 @@ project1/utils.d.ts Matched by default include pattern '**/*' project1/typeroot1/sometype/index.d.ts Matched by default include pattern '**/*' - Entry point for implicit type library 'sometype' [HH:MM:SS AM] Project 'project2/tsconfig.json' is out of date because output file 'project2/tsconfig.tsbuildinfo' does not exist [HH:MM:SS AM] Building project 'project2/tsconfig.json'... diff --git a/testdata/baselines/reference/tsbuildWatch/libraryResolution/with-config.js b/testdata/baselines/reference/tsbuildWatch/libraryResolution/with-config.js index 532f90d66a0..db11d6cb112 100644 --- a/testdata/baselines/reference/tsbuildWatch/libraryResolution/with-config.js +++ b/testdata/baselines/reference/tsbuildWatch/libraryResolution/with-config.js @@ -88,13 +88,6 @@ Output:: [HH:MM:SS AM] Building project 'project1/tsconfig.json'... -======== Resolving type reference directive 'sometype', containing file '/home/src/workspace/projects/project1/__inferred type names__.ts', root directory '/home/src/workspace/projects/project1/typeroot1'. ======== -Resolving with primary search path '/home/src/workspace/projects/project1/typeroot1'. -File '/home/src/workspace/projects/project1/typeroot1/sometype.d.ts' does not exist. -File '/home/src/workspace/projects/project1/typeroot1/sometype/package.json' does not exist. -File '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts' exists - use it as a name resolution result. -Resolving real path for '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts', result '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts'. -======== Type reference directive 'sometype' was successfully resolved to '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts', primary: true. ======== ../../tslibs/TS/Lib/lib.es5.d.ts Library referenced via 'es5' from file 'project1/file2.ts' Library 'lib.es5.d.ts' specified in compilerOptions @@ -116,7 +109,6 @@ project1/utils.d.ts Matched by default include pattern '**/*' project1/typeroot1/sometype/index.d.ts Matched by default include pattern '**/*' - Entry point for implicit type library 'sometype' [HH:MM:SS AM] Project 'project2/tsconfig.json' is out of date because output file 'project2/tsconfig.tsbuildinfo' does not exist [HH:MM:SS AM] Building project 'project2/tsconfig.json'... diff --git a/testdata/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesnt-crash-under---strict.js b/testdata/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesnt-crash-under---strict.js index 22b5b6436ae..66d529dcd3e 100644 --- a/testdata/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesnt-crash-under---strict.js +++ b/testdata/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesnt-crash-under---strict.js @@ -30,13 +30,23 @@ export const App = () =>
; tsgo --strict ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: +src/index.tsx:1:26 - error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists. + +1 export const App = () =>
; +   ~~~~~~~~~~~~~~~~~~ + src/index.tsx:1:26 - error TS7016: Could not find a declaration file for module 'react/jsx-runtime'. '/home/src/workspaces/project/node_modules/react/jsx-runtime.js' implicitly has an 'any' type. 1 export const App = () =>
;    ~~~~~~~~~~~~~~~~~~~~~~~~ +src/index.tsx:1:44 - error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists. + +1 export const App = () =>
; +   ~~~~~~ + -Found 1 error in src/index.tsx:1 +Found 3 errors in the same file, starting at: src/index.tsx:1 //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// @@ -70,7 +80,7 @@ const App = () => jsx_runtime_1.jsx("div", { propA: true }); exports.App = App; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2025.full.d.ts","./src/index.tsx","./node_modules/@types/react/index.d.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},"0c3575e38f9aabc971cea9c73a211979-export const App = () =>
;",{"version":"a6afc3c631ce6ad7bc83db84287b52ea-export {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"jsx":4,"jsxImportSource":"react","module":1,"strict":true},"semanticDiagnosticsPerFile":[[2,[{"pos":25,"end":49,"code":7016,"category":1,"messageKey":"Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016","messageArgs":["react/jsx-runtime","/home/src/workspaces/project/node_modules/react/jsx-runtime.js"]}]]]} +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2025.full.d.ts","./src/index.tsx"],"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},"0c3575e38f9aabc971cea9c73a211979-export const App = () =>
;"],"options":{"jsx":4,"jsxImportSource":"react","module":1,"strict":true},"semanticDiagnosticsPerFile":[[2,[{"pos":25,"end":43,"code":7026,"category":1,"messageKey":"JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026","messageArgs":["IntrinsicElements"]},{"pos":25,"end":49,"code":7016,"category":1,"messageKey":"Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016","messageArgs":["react/jsx-runtime","/home/src/workspaces/project/node_modules/react/jsx-runtime.js"]},{"pos":43,"end":49,"code":7026,"category":1,"messageKey":"JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026","messageArgs":["IntrinsicElements"]}]]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", @@ -84,8 +94,7 @@ exports.App = App; ], "fileNames": [ "lib.es2025.full.d.ts", - "./src/index.tsx", - "./node_modules/@types/react/index.d.ts" + "./src/index.tsx" ], "fileInfos": [ { @@ -105,18 +114,6 @@ exports.App = App; "version": "0c3575e38f9aabc971cea9c73a211979-export const App = () =>
;", "signature": "0c3575e38f9aabc971cea9c73a211979-export const App = () =>
;", "impliedNodeFormat": "CommonJS" - }, - { - "fileName": "./node_modules/@types/react/index.d.ts", - "version": "a6afc3c631ce6ad7bc83db84287b52ea-export {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}", - "signature": "a6afc3c631ce6ad7bc83db84287b52ea-export {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}", - "affectsGlobalScope": true, - "impliedNodeFormat": "CommonJS", - "original": { - "version": "a6afc3c631ce6ad7bc83db84287b52ea-export {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}", - "affectsGlobalScope": true, - "impliedNodeFormat": 1 - } } ], "options": { @@ -129,6 +126,16 @@ exports.App = App; [ "./src/index.tsx", [ + { + "pos": 25, + "end": 43, + "code": 7026, + "category": 1, + "messageKey": "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", + "messageArgs": [ + "IntrinsicElements" + ] + }, { "pos": 25, "end": 49, @@ -139,16 +146,25 @@ exports.App = App; "react/jsx-runtime", "/home/src/workspaces/project/node_modules/react/jsx-runtime.js" ] + }, + { + "pos": 43, + "end": 49, + "code": 7026, + "category": 1, + "messageKey": "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", + "messageArgs": [ + "IntrinsicElements" + ] } ] ] ], - "size": 1659 + "size": 1655 } tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts *refresh* /home/src/workspaces/project/src/index.tsx -*refresh* /home/src/workspaces/project/node_modules/@types/react/index.d.ts Signatures:: diff --git a/testdata/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesnt-crash.js b/testdata/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesnt-crash.js index b9c2e2af9bf..0b1c59b4041 100644 --- a/testdata/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesnt-crash.js +++ b/testdata/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesnt-crash.js @@ -30,13 +30,23 @@ export const App = () =>
; tsgo ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: +src/index.tsx:1:26 - error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists. + +1 export const App = () =>
; +   ~~~~~~~~~~~~~~~~~~ + src/index.tsx:1:26 - error TS7016: Could not find a declaration file for module 'react/jsx-runtime'. '/home/src/workspaces/project/node_modules/react/jsx-runtime.js' implicitly has an 'any' type. 1 export const App = () =>
;    ~~~~~~~~~~~~~~~~~~~~~~~~ +src/index.tsx:1:44 - error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists. + +1 export const App = () =>
; +   ~~~~~~ + -Found 1 error in src/index.tsx:1 +Found 3 errors in the same file, starting at: src/index.tsx:1 //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// @@ -70,7 +80,7 @@ const App = () => jsx_runtime_1.jsx("div", { propA: true }); exports.App = App; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2025.full.d.ts","./src/index.tsx","./node_modules/@types/react/index.d.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},"0c3575e38f9aabc971cea9c73a211979-export const App = () =>
;",{"version":"a6afc3c631ce6ad7bc83db84287b52ea-export {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"options":{"jsx":4,"jsxImportSource":"react","module":1},"semanticDiagnosticsPerFile":[[2,[{"pos":25,"end":49,"code":7016,"category":1,"messageKey":"Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016","messageArgs":["react/jsx-runtime","/home/src/workspaces/project/node_modules/react/jsx-runtime.js"]}]]]} +{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2025.full.d.ts","./src/index.tsx"],"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},"0c3575e38f9aabc971cea9c73a211979-export const App = () =>
;"],"options":{"jsx":4,"jsxImportSource":"react","module":1},"semanticDiagnosticsPerFile":[[2,[{"pos":25,"end":43,"code":7026,"category":1,"messageKey":"JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026","messageArgs":["IntrinsicElements"]},{"pos":25,"end":49,"code":7016,"category":1,"messageKey":"Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016","messageArgs":["react/jsx-runtime","/home/src/workspaces/project/node_modules/react/jsx-runtime.js"]},{"pos":43,"end":49,"code":7026,"category":1,"messageKey":"JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026","messageArgs":["IntrinsicElements"]}]]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", @@ -84,8 +94,7 @@ exports.App = App; ], "fileNames": [ "lib.es2025.full.d.ts", - "./src/index.tsx", - "./node_modules/@types/react/index.d.ts" + "./src/index.tsx" ], "fileInfos": [ { @@ -105,18 +114,6 @@ exports.App = App; "version": "0c3575e38f9aabc971cea9c73a211979-export const App = () =>
;", "signature": "0c3575e38f9aabc971cea9c73a211979-export const App = () =>
;", "impliedNodeFormat": "CommonJS" - }, - { - "fileName": "./node_modules/@types/react/index.d.ts", - "version": "a6afc3c631ce6ad7bc83db84287b52ea-export {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}", - "signature": "a6afc3c631ce6ad7bc83db84287b52ea-export {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}", - "affectsGlobalScope": true, - "impliedNodeFormat": "CommonJS", - "original": { - "version": "a6afc3c631ce6ad7bc83db84287b52ea-export {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}", - "affectsGlobalScope": true, - "impliedNodeFormat": 1 - } } ], "options": { @@ -128,6 +125,16 @@ exports.App = App; [ "./src/index.tsx", [ + { + "pos": 25, + "end": 43, + "code": 7026, + "category": 1, + "messageKey": "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", + "messageArgs": [ + "IntrinsicElements" + ] + }, { "pos": 25, "end": 49, @@ -138,16 +145,25 @@ exports.App = App; "react/jsx-runtime", "/home/src/workspaces/project/node_modules/react/jsx-runtime.js" ] + }, + { + "pos": 43, + "end": 49, + "code": 7026, + "category": 1, + "messageKey": "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", + "messageArgs": [ + "IntrinsicElements" + ] } ] ] ], - "size": 1645 + "size": 1641 } tsconfig.json:: SemanticDiagnostics:: *refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts *refresh* /home/src/workspaces/project/src/index.tsx -*refresh* /home/src/workspaces/project/node_modules/@types/react/index.d.ts Signatures:: diff --git a/testdata/baselines/reference/tsc/libraryResolution/with-config-with-libReplacement.js b/testdata/baselines/reference/tsc/libraryResolution/with-config-with-libReplacement.js index 64b16f23abe..92e73db887e 100644 --- a/testdata/baselines/reference/tsc/libraryResolution/with-config-with-libReplacement.js +++ b/testdata/baselines/reference/tsc/libraryResolution/with-config-with-libReplacement.js @@ -128,13 +128,6 @@ export const y = 10; tsgo -p project1 --explainFiles ExitStatus:: Success Output:: -======== Resolving type reference directive 'sometype', containing file '/home/src/workspace/projects/project1/__inferred type names__.ts', root directory '/home/src/workspace/projects/project1/typeroot1'. ======== -Resolving with primary search path '/home/src/workspace/projects/project1/typeroot1'. -File '/home/src/workspace/projects/project1/typeroot1/sometype.d.ts' does not exist. -File '/home/src/workspace/projects/project1/typeroot1/sometype/package.json' does not exist. -File '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts' exists - use it as a name resolution result. -Resolving real path for '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts', result '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts'. -======== Type reference directive 'sometype' was successfully resolved to '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts', primary: true. ======== ======== Resolving module '@typescript/lib-dom' from '/home/src/workspace/projects/project1/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ======== Module resolution kind is not specified, using 'Bundler'. Resolving in CJS mode with conditions 'require', 'types'. @@ -248,7 +241,6 @@ project1/utils.d.ts Matched by default include pattern '**/*' project1/typeroot1/sometype/index.d.ts Matched by default include pattern '**/*' - Entry point for implicit type library 'sometype' //// [/home/src/workspace/projects/project1/file.d.ts] *new* export declare const file = 10; diff --git a/testdata/baselines/reference/tsc/libraryResolution/with-config.js b/testdata/baselines/reference/tsc/libraryResolution/with-config.js index a3ba02740aa..fc47f01bef0 100644 --- a/testdata/baselines/reference/tsc/libraryResolution/with-config.js +++ b/testdata/baselines/reference/tsc/libraryResolution/with-config.js @@ -76,13 +76,6 @@ export const y = 10; tsgo -p project1 --explainFiles ExitStatus:: Success Output:: -======== Resolving type reference directive 'sometype', containing file '/home/src/workspace/projects/project1/__inferred type names__.ts', root directory '/home/src/workspace/projects/project1/typeroot1'. ======== -Resolving with primary search path '/home/src/workspace/projects/project1/typeroot1'. -File '/home/src/workspace/projects/project1/typeroot1/sometype.d.ts' does not exist. -File '/home/src/workspace/projects/project1/typeroot1/sometype/package.json' does not exist. -File '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts' exists - use it as a name resolution result. -Resolving real path for '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts', result '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts'. -======== Type reference directive 'sometype' was successfully resolved to '/home/src/workspace/projects/project1/typeroot1/sometype/index.d.ts', primary: true. ======== ../../tslibs/TS/Lib/lib.es5.d.ts Library referenced via 'es5' from file 'project1/file2.ts' Library 'lib.es5.d.ts' specified in compilerOptions @@ -104,7 +97,6 @@ project1/utils.d.ts Matched by default include pattern '**/*' project1/typeroot1/sometype/index.d.ts Matched by default include pattern '**/*' - Entry point for implicit type library 'sometype' //// [/home/src/tslibs/TS/Lib/lib.es5.d.ts] *Lib* /// interface Boolean {}