diff --git a/tests/baselines/reference/anonymousModules.errors.txt b/tests/baselines/reference/anonymousModules.errors.txt index 9ed762464d9..80b3447b5d0 100644 --- a/tests/baselines/reference/anonymousModules.errors.txt +++ b/tests/baselines/reference/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/tests/baselines/reference/conflictingCommonJSES2015Exports.errors.txt b/tests/baselines/reference/conflictingCommonJSES2015Exports.errors.txt index 755baa04ea2..4918b0d860a 100644 --- a/tests/baselines/reference/conflictingCommonJSES2015Exports.errors.txt +++ b/tests/baselines/reference/conflictingCommonJSES2015Exports.errors.txt @@ -1,11 +1,11 @@ -bug24934.js(2,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +bug24934.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. ==== bug24934.js (1 errors) ==== export function abc(a, b, c) { return 5; } module.exports = { abc }; ~~~~~~ -!!! 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. ==== use.js (0 errors) ==== import { abc } from './bug24934'; abc(1, 2, 3); diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt index 4acac636af7..23962ca1b47 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt +++ b/tests/baselines/reference/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. @@ -105,7 +105,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/tests/baselines/reference/didYouMeanSuggestionErrors.errors.txt b/tests/baselines/reference/didYouMeanSuggestionErrors.errors.txt index c109c19fe7a..a51a1d701da 100644 --- a/tests/baselines/reference/didYouMeanSuggestionErrors.errors.txt +++ b/tests/baselines/reference/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/tests/baselines/reference/externModule.errors.txt b/tests/baselines/reference/externModule.errors.txt index 5d933216d1d..3a1ac80845b 100644 --- a/tests/baselines/reference/externModule.errors.txt +++ b/tests/baselines/reference/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/tests/baselines/reference/fixSignatureCaching.errors.txt b/tests/baselines/reference/fixSignatureCaching.errors.txt index c6a19104400..5c3ceb0cf96 100644 --- a/tests/baselines/reference/fixSignatureCaching.errors.txt +++ b/tests/baselines/reference/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/tests/baselines/reference/innerModExport1.errors.txt b/tests/baselines/reference/innerModExport1.errors.txt index 6ff7e61c165..45eba7396c5 100644 --- a/tests/baselines/reference/innerModExport1.errors.txt +++ b/tests/baselines/reference/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. @@ -9,7 +9,7 @@ innerModExport1.ts(5,12): error TS1437: Namespace must be given a name. 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/tests/baselines/reference/innerModExport2.errors.txt b/tests/baselines/reference/innerModExport2.errors.txt index 1132230b927..c3541b1c211 100644 --- a/tests/baselines/reference/innerModExport2.errors.txt +++ b/tests/baselines/reference/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 TS2551: 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/tests/baselines/reference/jsDeclarationsExportFormsErr.errors.txt b/tests/baselines/reference/jsDeclarationsExportFormsErr.errors.txt index b2959017f78..91a0799f077 100644 --- a/tests/baselines/reference/jsDeclarationsExportFormsErr.errors.txt +++ b/tests/baselines/reference/jsDeclarationsExportFormsErr.errors.txt @@ -1,6 +1,6 @@ bar.js(1,1): error TS8002: 'import ... =' can only be used in TypeScript files. bar.js(2,1): error TS8003: 'export =' can only be used in TypeScript files. -bin.js(2,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +bin.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. globalNs.js(2,1): error TS1315: Global module exports may only appear in declaration files. @@ -19,7 +19,7 @@ globalNs.js(2,1): error TS1315: Global module exports may only appear in declara import * as ns from "./cls"; module.exports = ns; // We refuse to bind cjs module exports assignments in the same file we find an import in ~~~~~~ -!!! 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. ==== globalNs.js (1 errors) ==== export * from "./cls"; diff --git a/tests/baselines/reference/jsDeclarationsTypeReferences.js b/tests/baselines/reference/jsDeclarationsTypeReferences.js index 2ce7d5b13b1..108297facae 100644 --- a/tests/baselines/reference/jsDeclarationsTypeReferences.js +++ b/tests/baselines/reference/jsDeclarationsTypeReferences.js @@ -29,22 +29,3 @@ module.exports = { export const thing: Something; import Something_1 = require("fs"); import Something = Something_1.Something; - - -//// [DtsFileErrors] - - -tests/cases/conformance/jsdoc/declarations/out/index.d.ts(2,30): error TS2307: Cannot find module 'fs' or its corresponding type declarations. - - -==== tests/cases/conformance/jsdoc/declarations/out/index.d.ts (1 errors) ==== - export const thing: Something; - import Something_1 = require("fs"); - ~~~~ -!!! error TS2307: Cannot find module 'fs' or its corresponding type declarations. - import Something = Something_1.Something; - -==== node_modules/@types/node/index.d.ts (0 errors) ==== - declare module "fs" { - export class Something {} - } \ No newline at end of file diff --git a/tests/baselines/reference/jsDeclarationsTypeReferences3.js b/tests/baselines/reference/jsDeclarationsTypeReferences3.js index 97b967a9ae7..c149fbb82b5 100644 --- a/tests/baselines/reference/jsDeclarationsTypeReferences3.js +++ b/tests/baselines/reference/jsDeclarationsTypeReferences3.js @@ -31,26 +31,3 @@ export namespace A { } import Something_1 = require("fs"); import Something = Something_1.Something; - - -//// [DtsFileErrors] - - -tests/cases/conformance/jsdoc/declarations/out/index.d.ts(6,30): error TS2307: Cannot find module 'fs' or its corresponding type declarations. - - -==== tests/cases/conformance/jsdoc/declarations/out/index.d.ts (1 errors) ==== - export namespace A { - namespace B { - let thing: Something; - } - } - import Something_1 = require("fs"); - ~~~~ -!!! error TS2307: Cannot find module 'fs' or its corresponding type declarations. - import Something = Something_1.Something; - -==== node_modules/@types/node/index.d.ts (0 errors) ==== - declare module "fs" { - export class Something {} - } \ No newline at end of file diff --git a/tests/baselines/reference/jsxAndTypeAssertion.errors.txt b/tests/baselines/reference/jsxAndTypeAssertion.errors.txt index 7346a4a1360..2485c0a71a1 100644 --- a/tests/baselines/reference/jsxAndTypeAssertion.errors.txt +++ b/tests/baselines/reference/jsxAndTypeAssertion.errors.txt @@ -1,5 +1,5 @@ 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,31): error TS1381: Unexpected token. Did you mean `{'}'}` or `}`? jsxAndTypeAssertion.tsx(8,6): error TS17008: JSX element 'any' has no corresponding closing tag. @@ -33,7 +33,7 @@ jsxAndTypeAssertion.tsx(21,1): error TS1005: ' 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 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'. @@ -23,7 +23,7 @@ export const x = 0; module.exports.y = 0; // Error ~~~~~~ -!!! 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. ==== /b.ts (0 errors) ==== export default 0; @@ -54,7 +54,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; @@ -100,7 +100,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/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node16).errors.txt b/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node16).errors.txt index 2a0e2142ec2..0d3a1ddfa8f 100644 --- a/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node16).errors.txt +++ b/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node16).errors.txt @@ -1,5 +1,5 @@ file.js(2,8): error TS2882: Cannot find module or type declarations for side-effect import of 'fs'. -file.js(4,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +file.js(4,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. index.js(3,1): error TS1203: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead. index.js(3,1): error TS8003: 'export =' can only be used in TypeScript files. subfolder/index.js(3,1): error TS8003: 'export =' can only be used in TypeScript files. @@ -31,7 +31,7 @@ subfolder/index.js(3,1): error TS8003: 'export =' can only be used in TypeScript const a = {}; module.exports = 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. ==== package.json (0 errors) ==== { "name": "package", diff --git a/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node18).errors.txt b/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node18).errors.txt index 2a0e2142ec2..0d3a1ddfa8f 100644 --- a/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node18).errors.txt +++ b/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node18).errors.txt @@ -1,5 +1,5 @@ file.js(2,8): error TS2882: Cannot find module or type declarations for side-effect import of 'fs'. -file.js(4,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +file.js(4,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. index.js(3,1): error TS1203: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead. index.js(3,1): error TS8003: 'export =' can only be used in TypeScript files. subfolder/index.js(3,1): error TS8003: 'export =' can only be used in TypeScript files. @@ -31,7 +31,7 @@ subfolder/index.js(3,1): error TS8003: 'export =' can only be used in TypeScript const a = {}; module.exports = 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. ==== package.json (0 errors) ==== { "name": "package", diff --git a/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node20).errors.txt b/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node20).errors.txt index 2a0e2142ec2..0d3a1ddfa8f 100644 --- a/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node20).errors.txt +++ b/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=node20).errors.txt @@ -1,5 +1,5 @@ file.js(2,8): error TS2882: Cannot find module or type declarations for side-effect import of 'fs'. -file.js(4,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +file.js(4,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. index.js(3,1): error TS1203: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead. index.js(3,1): error TS8003: 'export =' can only be used in TypeScript files. subfolder/index.js(3,1): error TS8003: 'export =' can only be used in TypeScript files. @@ -31,7 +31,7 @@ subfolder/index.js(3,1): error TS8003: 'export =' can only be used in TypeScript const a = {}; module.exports = 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. ==== package.json (0 errors) ==== { "name": "package", diff --git a/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=nodenext).errors.txt b/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=nodenext).errors.txt index 2a0e2142ec2..0d3a1ddfa8f 100644 --- a/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=nodenext).errors.txt +++ b/tests/baselines/reference/nodeModulesAllowJsExportAssignment(module=nodenext).errors.txt @@ -1,5 +1,5 @@ file.js(2,8): error TS2882: Cannot find module or type declarations for side-effect import of 'fs'. -file.js(4,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +file.js(4,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. index.js(3,1): error TS1203: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead. index.js(3,1): error TS8003: 'export =' can only be used in TypeScript files. subfolder/index.js(3,1): error TS8003: 'export =' can only be used in TypeScript files. @@ -31,7 +31,7 @@ subfolder/index.js(3,1): error TS8003: 'export =' can only be used in TypeScript const a = {}; module.exports = 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. ==== package.json (0 errors) ==== { "name": "package", diff --git a/tests/baselines/reference/overloadingStaticFunctionsInFunctions.errors.txt b/tests/baselines/reference/overloadingStaticFunctionsInFunctions.errors.txt index 0480862a9fa..04f5d04cf14 100644 --- a/tests/baselines/reference/overloadingStaticFunctionsInFunctions.errors.txt +++ b/tests/baselines/reference/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/tests/baselines/reference/parser509534.errors.txt b/tests/baselines/reference/parser509534.errors.txt index 48919642e74..22e2c592c88 100644 --- a/tests/baselines/reference/parser509534.errors.txt +++ b/tests/baselines/reference/parser509534.errors.txt @@ -1,15 +1,15 @@ -parser509534.ts(2,14): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -parser509534.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`. +parser509534.ts(2,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. +parser509534.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. ==== parser509534.ts (2 errors) ==== "use strict"; var config = require("../config"); ~~~~~~~ -!!! 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. module.exports.route = function (server) { ~~~~~~ -!!! 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. // General Login Page server.get(config.env.siteRoot + "/auth/login", function (req, res, next) { diff --git a/tests/baselines/reference/parser509693.errors.txt b/tests/baselines/reference/parser509693.errors.txt index 0702aad2a5b..bcebf0987b8 100644 --- a/tests/baselines/reference/parser509693.errors.txt +++ b/tests/baselines/reference/parser509693.errors.txt @@ -1,10 +1,10 @@ -parser509693.ts(1,6): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -parser509693.ts(1,22): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +parser509693.ts(1,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. +parser509693.ts(1,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. ==== parser509693.ts (2 errors) ==== 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/tests/baselines/reference/parser519458.errors.txt b/tests/baselines/reference/parser519458.errors.txt index 8bd4d77f6a3..4534e059f31 100644 --- a/tests/baselines/reference/parser519458.errors.txt +++ b/tests/baselines/reference/parser519458.errors.txt @@ -1,5 +1,5 @@ parser519458.ts(1,15): error TS2503: Cannot find namespace 'module'. -parser519458.ts(1,15): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +parser519458.ts(1,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. parser519458.ts(1,21): error TS1005: ';' expected. @@ -8,7 +8,7 @@ parser519458.ts(1,21): error TS1005: ';' expected. ~~~~~~ !!! 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. \ No newline at end of file diff --git a/tests/baselines/reference/parser521128.errors.txt b/tests/baselines/reference/parser521128.errors.txt index be56ca0f12b..a06d25bba45 100644 --- a/tests/baselines/reference/parser521128.errors.txt +++ b/tests/baselines/reference/parser521128.errors.txt @@ -1,10 +1,10 @@ -parser521128.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`. +parser521128.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. parser521128.ts(1,15): error TS1005: ';' expected. ==== parser521128.ts (2 errors) ==== 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/tests/baselines/reference/parserCommaInTypeMemberList2.errors.txt b/tests/baselines/reference/parserCommaInTypeMemberList2.errors.txt index 4fd3eeeb179..10011c80138 100644 --- a/tests/baselines/reference/parserCommaInTypeMemberList2.errors.txt +++ b/tests/baselines/reference/parserCommaInTypeMemberList2.errors.txt @@ -1,8 +1,8 @@ -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,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 errors) ==== var s = $.extend< { workItem: any }, { workItem: any, width: string }>({ 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/tests/baselines/reference/parserharness.errors.txt b/tests/baselines/reference/parserharness.errors.txt index d938d138ba8..1d2f990cf51 100644 --- a/tests/baselines/reference/parserharness.errors.txt +++ b/tests/baselines/reference/parserharness.errors.txt @@ -5,8 +5,8 @@ parserharness.ts(19,21): error TS6053: File 'diff.ts' not found. parserharness.ts(21,21): error TS2749: 'Harness.Assert' refers to a value, but is being used as a type here. Did you mean 'typeof Harness.Assert'? parserharness.ts(25,17): error TS2304: Cannot find name 'IIO'. parserharness.ts(41,12): error TS2304: Cannot find name 'ActiveXObject'. -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(341,13): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean the static member 'Runnable.errorHandlerStack'? parserharness.ts(347,13): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean the static member 'Runnable.errorHandlerStack'? parserharness.ts(351,17): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean the static member 'Runnable.errorHandlerStack'? @@ -169,10 +169,10 @@ parserharness.ts(2030,32): error TS2304: Cannot find name 'Diff'. 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/tests/baselines/reference/reservedWords2.errors.txt b/tests/baselines/reference/reservedWords2.errors.txt index 7dea580e5ae..9b8d5eaa59a 100644 --- a/tests/baselines/reference/reservedWords2.errors.txt +++ b/tests/baselines/reference/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. @@ -42,7 +42,7 @@ reservedWords2.ts(12,17): error TS1138: Parameter declaration expected. ~ !!! 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/tests/baselines/reference/staticsInAFunction.errors.txt b/tests/baselines/reference/staticsInAFunction.errors.txt index f7555f7aebe..98f5ecc7c21 100644 --- a/tests/baselines/reference/staticsInAFunction.errors.txt +++ b/tests/baselines/reference/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/tests/baselines/reference/templateStringInModuleName.errors.txt b/tests/baselines/reference/templateStringInModuleName.errors.txt index 8bc71e48c3d..a691f3b30f5 100644 --- a/tests/baselines/reference/templateStringInModuleName.errors.txt +++ b/tests/baselines/reference/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/tests/baselines/reference/templateStringInModuleNameES6.errors.txt b/tests/baselines/reference/templateStringInModuleNameES6.errors.txt index 889daa0f75c..180a8d7e659 100644 --- a/tests/baselines/reference/templateStringInModuleNameES6.errors.txt +++ b/tests/baselines/reference/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/tests/baselines/reference/tsbuild/moduleResolution/type-reference-resolution-uses-correct-options-for-different-resolution-options-referenced-project.js b/tests/baselines/reference/tsbuild/moduleResolution/type-reference-resolution-uses-correct-options-for-different-resolution-options-referenced-project.js index 9766d4ace2c..78733b38652 100644 --- a/tests/baselines/reference/tsbuild/moduleResolution/type-reference-resolution-uses-correct-options-for-different-resolution-options-referenced-project.js +++ b/tests/baselines/reference/tsbuild/moduleResolution/type-reference-resolution-uses-correct-options-for-different-resolution-options-referenced-project.js @@ -9,6 +9,9 @@ export const theNum: TheNum = "type1"; "composite": true, "typeRoots": [ "./typeroot1" + ], + "types": [ + "sometype" ] }, "files": [ @@ -28,6 +31,9 @@ export const theNum: TheNum2 = "type2"; "composite": true, "typeRoots": [ "./typeroot2" + ], + "types": [ + "sometype" ] }, "files": [ @@ -63,23 +69,24 @@ Output:: [HH:MM:SS AM] Building project '/home/src/workspaces/project/packages/pkg1.tsconfig.json'... -packages/pkg1_index.ts:1:22 - error TS2304: Cannot find name 'TheNum'. - -1 export const theNum: TheNum = "type1"; -   ~~~~~~ - +======== 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. ======== [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 '/home/src/workspaces/project/packages/pkg2.tsconfig.json'... -packages/pkg2_index.ts:1:22 - error TS2304: Cannot find name 'TheNum2'. - -1 export const theNum: TheNum2 = "type2"; -   ~~~~~~~ - - -Found 2 errors. - +======== 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. ======== //// [/home/src/workspaces/project/packages/pkg1_index.js] @@ -94,13 +101,14 @@ export declare const theNum: TheNum; //// [/home/src/workspaces/project/packages/pkg1.tsconfig.tsbuildinfo] -{"fileNames":["../../../tslibs/ts/lib/lib.d.ts","./pkg1_index.ts"],"fileInfos":[{"version":"-25093698414-interface 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 {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9601687719-export const theNum: TheNum = \"type1\";","signature":"-11475605505-export declare const theNum: TheNum;\n"}],"root":[2],"options":{"composite":true},"semanticDiagnosticsPerFile":[[2,[{"start":21,"length":6,"messageText":"Cannot find name 'TheNum'.","category":1,"code":2304}]]],"latestChangedDtsFile":"./pkg1_index.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../../tslibs/ts/lib/lib.d.ts","./pkg1_index.ts","./typeroot1/sometype/index.d.ts"],"fileInfos":[{"version":"-25093698414-interface 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 {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9601687719-export const theNum: TheNum = \"type1\";","signature":"-11475605505-export declare const theNum: TheNum;\n"},{"version":"-4557394441-declare type TheNum = \"type1\";","affectsGlobalScope":true}],"root":[2],"options":{"composite":true},"latestChangedDtsFile":"./pkg1_index.d.ts","version":"FakeTSVersion"} //// [/home/src/workspaces/project/packages/pkg1.tsconfig.tsbuildinfo.readable.baseline.txt] { "fileNames": [ "../../../tslibs/ts/lib/lib.d.ts", - "./pkg1_index.ts" + "./pkg1_index.ts", + "./typeroot1/sometype/index.d.ts" ], "fileInfos": { "../../../tslibs/ts/lib/lib.d.ts": { @@ -119,6 +127,15 @@ export declare const theNum: TheNum; }, "version": "-9601687719-export const theNum: TheNum = \"type1\";", "signature": "-11475605505-export declare const theNum: TheNum;\n" + }, + "./typeroot1/sometype/index.d.ts": { + "original": { + "version": "-4557394441-declare type TheNum = \"type1\";", + "affectsGlobalScope": true + }, + "version": "-4557394441-declare type TheNum = \"type1\";", + "signature": "-4557394441-declare type TheNum = \"type1\";", + "affectsGlobalScope": true } }, "root": [ @@ -130,23 +147,9 @@ export declare const theNum: TheNum; "options": { "composite": true }, - "semanticDiagnosticsPerFile": [ - [ - "./pkg1_index.ts", - [ - { - "start": 21, - "length": 6, - "messageText": "Cannot find name 'TheNum'.", - "category": 1, - "code": 2304 - } - ] - ] - ], "latestChangedDtsFile": "./pkg1_index.d.ts", "version": "FakeTSVersion", - "size": 891 + "size": 881 } //// [/home/src/workspaces/project/packages/pkg2_index.js] @@ -161,13 +164,14 @@ export declare const theNum: TheNum2; //// [/home/src/workspaces/project/packages/pkg2.tsconfig.tsbuildinfo] -{"fileNames":["../../../tslibs/ts/lib/lib.d.ts","./pkg2_index.ts"],"fileInfos":[{"version":"-25093698414-interface 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 {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-12823281204-export const theNum: TheNum2 = \"type2\";","signature":"-13622769679-export declare const theNum: TheNum2;\n"}],"root":[2],"options":{"composite":true},"semanticDiagnosticsPerFile":[[2,[{"start":21,"length":7,"messageText":"Cannot find name 'TheNum2'.","category":1,"code":2304}]]],"latestChangedDtsFile":"./pkg2_index.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../../tslibs/ts/lib/lib.d.ts","./pkg2_index.ts","./typeroot2/sometype/index.d.ts"],"fileInfos":[{"version":"-25093698414-interface 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 {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-12823281204-export const theNum: TheNum2 = \"type2\";","signature":"-13622769679-export declare const theNum: TheNum2;\n"},{"version":"-980425686-declare type TheNum2 = \"type2\";","affectsGlobalScope":true}],"root":[2],"options":{"composite":true},"latestChangedDtsFile":"./pkg2_index.d.ts","version":"FakeTSVersion"} //// [/home/src/workspaces/project/packages/pkg2.tsconfig.tsbuildinfo.readable.baseline.txt] { "fileNames": [ "../../../tslibs/ts/lib/lib.d.ts", - "./pkg2_index.ts" + "./pkg2_index.ts", + "./typeroot2/sometype/index.d.ts" ], "fileInfos": { "../../../tslibs/ts/lib/lib.d.ts": { @@ -186,6 +190,15 @@ export declare const theNum: TheNum2; }, "version": "-12823281204-export const theNum: TheNum2 = \"type2\";", "signature": "-13622769679-export declare const theNum: TheNum2;\n" + }, + "./typeroot2/sometype/index.d.ts": { + "original": { + "version": "-980425686-declare type TheNum2 = \"type2\";", + "affectsGlobalScope": true + }, + "version": "-980425686-declare type TheNum2 = \"type2\";", + "signature": "-980425686-declare type TheNum2 = \"type2\";", + "affectsGlobalScope": true } }, "root": [ @@ -197,24 +210,10 @@ export declare const theNum: TheNum2; "options": { "composite": true }, - "semanticDiagnosticsPerFile": [ - [ - "./pkg2_index.ts", - [ - { - "start": 21, - "length": 7, - "messageText": "Cannot find name 'TheNum2'.", - "category": 1, - "code": 2304 - } - ] - ] - ], "latestChangedDtsFile": "./pkg2_index.d.ts", "version": "FakeTSVersion", - "size": 895 + "size": 884 } -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesn't-crash-under---strict.js b/tests/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesn't-crash-under---strict.js index b18d13df041..4faaf37a962 100644 --- a/tests/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesn't-crash-under---strict.js +++ b/tests/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesn't-crash-under---strict.js @@ -26,7 +26,10 @@ export const App = () =>
; "module": "commonjs", "jsx": "react-jsx", "incremental": true, - "jsxImportSource": "react" + "jsxImportSource": "react", + "types": [ + "react" + ] } } @@ -47,23 +50,13 @@ declare const console: { log(msg: any): void; }; /home/src/tslibs/TS/Lib/tsc.js --strict 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 3 errors in the same file, starting at: src/index.tsx:1 +Found 1 error in src/index.tsx:1 @@ -77,13 +70,14 @@ exports.App = App; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] -{"fileNames":["../../tslibs/ts/lib/lib.d.ts","./src/index.tsx"],"fileInfos":[{"version":"-25093698414-interface 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 {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-14760199789-export const App = () =>
;"],"root":[2],"options":{"jsx":4,"jsxImportSource":"react","module":1,"strict":true},"semanticDiagnosticsPerFile":[[2,[{"start":25,"length":18,"messageText":"JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.","category":1,"code":7026},{"start":25,"length":24,"code":7016,"category":1,"messageText":"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."},{"start":43,"length":6,"messageText":"JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.","category":1,"code":7026}]]],"version":"FakeTSVersion"} +{"fileNames":["../../tslibs/ts/lib/lib.d.ts","./src/index.tsx","./node_modules/@types/react/index.d.ts"],"fileInfos":[{"version":"-25093698414-interface 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 {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-14760199789-export const App = () =>
;",{"version":"-16587767667-\nexport {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}","affectsGlobalScope":true,"impliedFormat":1}],"root":[2],"options":{"jsx":4,"jsxImportSource":"react","module":1,"strict":true},"semanticDiagnosticsPerFile":[[2,[{"start":25,"length":24,"code":7016,"category":1,"messageText":"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."}]]],"version":"FakeTSVersion"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "fileNames": [ "../../tslibs/ts/lib/lib.d.ts", - "./src/index.tsx" + "./src/index.tsx", + "./node_modules/@types/react/index.d.ts" ], "fileInfos": { "../../tslibs/ts/lib/lib.d.ts": { @@ -98,6 +92,17 @@ exports.App = App; "./src/index.tsx": { "version": "-14760199789-export const App = () =>
;", "signature": "-14760199789-export const App = () =>
;" + }, + "./node_modules/@types/react/index.d.ts": { + "original": { + "version": "-16587767667-\nexport {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-16587767667-\nexport {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}", + "signature": "-16587767667-\nexport {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" } }, "root": [ @@ -116,32 +121,18 @@ exports.App = App; [ "./src/index.tsx", [ - { - "start": 25, - "length": 18, - "messageText": "JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.", - "category": 1, - "code": 7026 - }, { "start": 25, "length": 24, "code": 7016, "category": 1, "messageText": "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." - }, - { - "start": 43, - "length": 6, - "messageText": "JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.", - "category": 1, - "code": 7026 } ] ] ], "version": "FakeTSVersion", - "size": 1268 + "size": 1279 } diff --git a/tests/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesn't-crash.js b/tests/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesn't-crash.js index 63ec38b8dff..b5753462d9f 100644 --- a/tests/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesn't-crash.js +++ b/tests/baselines/reference/tsc/incremental/react-jsx-emit-mode-with-no-backing-types-found-doesn't-crash.js @@ -26,7 +26,10 @@ export const App = () =>
; "module": "commonjs", "jsx": "react-jsx", "incremental": true, - "jsxImportSource": "react" + "jsxImportSource": "react", + "types": [ + "react" + ] } } @@ -59,13 +62,14 @@ exports.App = App; //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] -{"fileNames":["../../tslibs/ts/lib/lib.d.ts","./src/index.tsx"],"fileInfos":[{"version":"-25093698414-interface 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 {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-14760199789-export const App = () =>
;"],"root":[2],"options":{"jsx":4,"jsxImportSource":"react","module":1},"version":"FakeTSVersion"} +{"fileNames":["../../tslibs/ts/lib/lib.d.ts","./src/index.tsx","./node_modules/@types/react/index.d.ts"],"fileInfos":[{"version":"-25093698414-interface 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 {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-14760199789-export const App = () =>
;",{"version":"-16587767667-\nexport {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}","affectsGlobalScope":true,"impliedFormat":1}],"root":[2],"options":{"jsx":4,"jsxImportSource":"react","module":1},"version":"FakeTSVersion"} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] { "fileNames": [ "../../tslibs/ts/lib/lib.d.ts", - "./src/index.tsx" + "./src/index.tsx", + "./node_modules/@types/react/index.d.ts" ], "fileInfos": { "../../tslibs/ts/lib/lib.d.ts": { @@ -80,6 +84,17 @@ exports.App = App; "./src/index.tsx": { "version": "-14760199789-export const App = () =>
;", "signature": "-14760199789-export const App = () =>
;" + }, + "./node_modules/@types/react/index.d.ts": { + "original": { + "version": "-16587767667-\nexport {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}", + "affectsGlobalScope": true, + "impliedFormat": 1 + }, + "version": "-16587767667-\nexport {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}", + "signature": "-16587767667-\nexport {};\ndeclare global {\n namespace JSX {\n interface Element {}\n interface IntrinsicElements {\n div: {\n propA?: boolean;\n };\n }\n }\n}", + "affectsGlobalScope": true, + "impliedFormat": "commonjs" } }, "root": [ @@ -94,7 +109,7 @@ exports.App = App; "module": 1 }, "version": "FakeTSVersion", - "size": 677 + "size": 1001 } diff --git a/tests/baselines/reference/tscWatch/resolutionCache/works-when-installing-something-in-node_modules-or-@types-when-there-is-no-notification-from-fs-for-index-file.js b/tests/baselines/reference/tscWatch/resolutionCache/works-when-installing-something-in-node_modules-or-@types-when-there-is-no-notification-from-fs-for-index-file.js index cfbc7fbc38d..8e9dda2d5f6 100644 --- a/tests/baselines/reference/tscWatch/resolutionCache/works-when-installing-something-in-node_modules-or-@types-when-there-is-no-notification-from-fs-for-index-file.js +++ b/tests/baselines/reference/tscWatch/resolutionCache/works-when-installing-something-in-node_modules-or-@types-when-there-is-no-notification-from-fs-for-index-file.js @@ -4,7 +4,13 @@ Input:: process.on("uncaughtException"); //// [/user/username/projects/myproject/tsconfig.json] -{} +{ + "compilerOptions": { + "types": [ + "node" + ] + } +} //// [/user/username/projects/myproject/node_modules/@types/node/index.d.ts] /// @@ -48,19 +54,22 @@ FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json Synchronizing program CreatingProgramWith:: roots: ["/user/username/projects/myproject/worker.ts"] - options: {"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} + options: {"types":["node"],"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/worker.ts 250 undefined Source file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/index.d.ts 250 undefined Source file +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/base.d.ts 250 undefined Source file +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts 250 undefined Source file +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/globals.d.ts 250 undefined Source file FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 250 undefined Source file -DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots -Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots -DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Type roots -Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Type roots -worker.ts:1:1 - error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - -1 process.on("uncaughtException"); -  ~~~~~~~ - -[HH:MM:SS AM] Found 1 error. Watching for file changes. +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /user/username/projects/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/ts3.6/package.json 2000 undefined File location affecting resolution +[HH:MM:SS AM] Found 0 errors. Watching for file changes. DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory @@ -72,12 +81,30 @@ process.on("uncaughtException"); PolledWatches:: -/user/username/projects/node_modules/@types: *new* - {"pollingInterval":500} +/user/username/projects/myproject/node_modules/@types/node/package.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/node_modules/@types/node/ts3.6/package.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/node_modules/@types/package.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/node_modules/package.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/package.json: *new* + {"pollingInterval":2000} +/user/username/projects/package.json: *new* + {"pollingInterval":2000} FsWatches:: /home/src/tslibs/TS/Lib/lib.d.ts: *new* {} +/user/username/projects/myproject/node_modules/@types/node/base.d.ts: *new* + {} +/user/username/projects/myproject/node_modules/@types/node/globals.d.ts: *new* + {} +/user/username/projects/myproject/node_modules/@types/node/index.d.ts: *new* + {} +/user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts: *new* + {} /user/username/projects/myproject/tsconfig.json: *new* {} /user/username/projects/myproject/worker.ts: *new* @@ -86,13 +113,16 @@ FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject: *new* {} -/user/username/projects/myproject/node_modules/@types: *new* +/user/username/projects/myproject/node_modules: *new* {} Program root files: [ "/user/username/projects/myproject/worker.ts" ] Program options: { + "types": [ + "node" + ], "watch": true, "extendedDiagnostics": true, "configFilePath": "/user/username/projects/myproject/tsconfig.json" @@ -101,14 +131,26 @@ Program structureReused: Not Program files:: /home/src/tslibs/TS/Lib/lib.d.ts /user/username/projects/myproject/worker.ts +/user/username/projects/myproject/node_modules/@types/node/globals.d.ts +/user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts +/user/username/projects/myproject/node_modules/@types/node/base.d.ts +/user/username/projects/myproject/node_modules/@types/node/index.d.ts Semantic diagnostics in builder refreshed for:: /home/src/tslibs/TS/Lib/lib.d.ts /user/username/projects/myproject/worker.ts +/user/username/projects/myproject/node_modules/@types/node/globals.d.ts +/user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts +/user/username/projects/myproject/node_modules/@types/node/base.d.ts +/user/username/projects/myproject/node_modules/@types/node/index.d.ts Shape signatures in builder refreshed for:: /home/src/tslibs/ts/lib/lib.d.ts (used version) /user/username/projects/myproject/worker.ts (used version) +/user/username/projects/myproject/node_modules/@types/node/globals.d.ts (used version) +/user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts (used version) +/user/username/projects/myproject/node_modules/@types/node/base.d.ts (used version) +/user/username/projects/myproject/node_modules/@types/node/index.d.ts (used version) exitCode:: ExitStatus.undefined @@ -121,64 +163,70 @@ Input:: //// [/user/username/projects/myproject/node_modules/@types/node/globals.d.ts] deleted Output:: -DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots +FileWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts 2:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/base.d.ts 250 undefined Source file Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts 2:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/base.d.ts 250 undefined Source file +DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations Scheduling invalidateFailedLookup -Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots +Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Scheduling update Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory -DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/globals.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots +FileWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/globals.d.ts 2:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/globals.d.ts 250 undefined Source file Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/globals.d.ts 2:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/globals.d.ts 250 undefined Source file +DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/globals.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations Scheduling invalidateFailedLookup, Cancelled earlier one -Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/globals.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots +Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/globals.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/globals.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Scheduling update Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/globals.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory -DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/index.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots +FileWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/index.d.ts 2:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/index.d.ts 250 undefined Source file Scheduling update +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/index.d.ts 2:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/index.d.ts 250 undefined Source file +DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/index.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations Scheduling invalidateFailedLookup, Cancelled earlier one -Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/index.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots +Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/index.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/index.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Scheduling update Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/index.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory -DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots +FileWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts 2:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts 250 undefined Source file Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts 2:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts 250 undefined Source file +DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations Scheduling invalidateFailedLookup, Cancelled earlier one -Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots +Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Scheduling update Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory -DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots -Scheduling update +DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations Scheduling invalidateFailedLookup, Cancelled earlier one -Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots +Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Project: /user/username/projects/myproject/tsconfig.json Detected file add/remove of non supported extension: /user/username/projects/myproject/node_modules/@types/node/ts3.6 Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory -DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots -Scheduling update +DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations Scheduling invalidateFailedLookup, Cancelled earlier one -Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots +Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Scheduling update Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory -DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots -Scheduling update +DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations Scheduling invalidateFailedLookup, Cancelled earlier one -Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots +Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Scheduling update Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Timeout callback:: count: 2 -19: timerToInvalidateFailedLookupResolutions *new* -20: timerToUpdateProgram *new* +17: timerToInvalidateFailedLookupResolutions *new* +18: timerToUpdateProgram *new* Before running Timeout callback:: count: 2 -19: timerToInvalidateFailedLookupResolutions -20: timerToUpdateProgram +17: timerToInvalidateFailedLookupResolutions +18: timerToUpdateProgram Host is moving to new time After running Timeout callback:: count: 0 @@ -189,34 +237,97 @@ Synchronizing program CreatingProgramWith:: roots: ["/user/username/projects/myproject/worker.ts"] - options: {"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} -worker.ts:1:1 - error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. + options: {"types":["node"],"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/globals.d.ts 250 undefined Source file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules 1 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules 1 undefined Failed Lookup Locations +FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts 250 undefined Source file +FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/base.d.ts 250 undefined Source file +FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/index.d.ts 250 undefined Source file +FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/package.json 2000 undefined File location affecting resolution +FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types/package.json 2000 undefined File location affecting resolution +FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/package.json 2000 undefined File location affecting resolution +FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined File location affecting resolution +FileWatcher:: Close:: WatchInfo: /user/username/projects/package.json 2000 undefined File location affecting resolution +FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/ts3.6/package.json 2000 undefined File location affecting resolution +error TS2688: Cannot find type definition file for 'node'. + The file is in the program because: + Entry point of type library 'node' specified in compilerOptions -1 process.on("uncaughtException"); -  ~~~~~~~ + tsconfig.json:4:7 + 4 "node" +    ~~~~~~ + File is entry point of type library specified here. [HH:MM:SS AM] Found 1 error. Watching for file changes. +//// [/user/username/projects/myproject/worker.js] file written with same contents + +PolledWatches:: +/user/username/projects/node_modules: *new* + {"pollingInterval":500} + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types/node/package.json: + {"pollingInterval":2000} +/user/username/projects/myproject/node_modules/@types/node/ts3.6/package.json: + {"pollingInterval":2000} +/user/username/projects/myproject/node_modules/@types/package.json: + {"pollingInterval":2000} +/user/username/projects/myproject/node_modules/package.json: + {"pollingInterval":2000} +/user/username/projects/myproject/package.json: + {"pollingInterval":2000} +/user/username/projects/package.json: + {"pollingInterval":2000} + +FsWatches:: +/home/src/tslibs/TS/Lib/lib.d.ts: + {} +/user/username/projects/myproject/tsconfig.json: + {} +/user/username/projects/myproject/worker.ts: + {} + +FsWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types/node/base.d.ts: + {} +/user/username/projects/myproject/node_modules/@types/node/globals.d.ts: + {} +/user/username/projects/myproject/node_modules/@types/node/index.d.ts: + {} +/user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject: + {} +/user/username/projects/myproject/node_modules: + {} Program root files: [ "/user/username/projects/myproject/worker.ts" ] Program options: { + "types": [ + "node" + ], "watch": true, "extendedDiagnostics": true, "configFilePath": "/user/username/projects/myproject/tsconfig.json" } -Program structureReused: SafeModules +Program structureReused: Not Program files:: /home/src/tslibs/TS/Lib/lib.d.ts /user/username/projects/myproject/worker.ts -Semantic diagnostics in builder refreshed for:: +No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/user/username/projects/myproject/worker.ts (computed .d.ts) exitCode:: ExitStatus.undefined @@ -228,74 +339,45 @@ export const foo = 10; Output:: -DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots -Scheduling update +DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations Scheduling invalidateFailedLookup -Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots +Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Scheduling update Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory -DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots -Scheduling update +DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations Scheduling invalidateFailedLookup, Cancelled earlier one -Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots +Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Scheduling update Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory -DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha/index.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots -Scheduling update +DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha/index.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations Scheduling invalidateFailedLookup, Cancelled earlier one -Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha/index.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots +Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha/index.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha/index.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Scheduling update Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha/index.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Timeout callback:: count: 2 -28: timerToInvalidateFailedLookupResolutions *new* -29: timerToUpdateProgram *new* +23: timerToInvalidateFailedLookupResolutions *new* +24: timerToUpdateProgram *new* Before running Timeout callback:: count: 2 -28: timerToInvalidateFailedLookupResolutions -29: timerToUpdateProgram +23: timerToInvalidateFailedLookupResolutions +24: timerToUpdateProgram Host is moving to new time -After running Timeout callback:: count: 0 +After running Timeout callback:: count: 1 Output:: -Reloading new file names and options -Synchronizing program -[HH:MM:SS AM] File change detected. Starting incremental compilation... - -CreatingProgramWith:: - roots: ["/user/username/projects/myproject/worker.ts"] - options: {"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} -worker.ts:1:1 - error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - -1 process.on("uncaughtException"); -  ~~~~~~~ - -[HH:MM:SS AM] Found 1 error. Watching for file changes. - +Scheduling update +Timeout callback:: count: 1 +24: timerToUpdateProgram *deleted* +25: timerToUpdateProgram *new* -Program root files: [ - "/user/username/projects/myproject/worker.ts" -] -Program options: { - "watch": true, - "extendedDiagnostics": true, - "configFilePath": "/user/username/projects/myproject/tsconfig.json" -} -Program structureReused: SafeModules -Program files:: -/home/src/tslibs/TS/Lib/lib.d.ts -/user/username/projects/myproject/worker.ts - -Semantic diagnostics in builder refreshed for:: - -No shapes updated in the builder:: exitCode:: ExitStatus.undefined @@ -304,22 +386,22 @@ Change:: npm ci step three: create atTypes node folder Input:: Output:: -DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots -Scheduling update +DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations Scheduling invalidateFailedLookup -Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots +Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Scheduling update Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Timeout callback:: count: 2 -31: timerToInvalidateFailedLookupResolutions *new* -32: timerToUpdateProgram *new* +25: timerToUpdateProgram *deleted* +26: timerToInvalidateFailedLookupResolutions *new* +27: timerToUpdateProgram *new* Before running Timeout callback:: count: 2 -31: timerToInvalidateFailedLookupResolutions -32: timerToUpdateProgram +26: timerToInvalidateFailedLookupResolutions +27: timerToUpdateProgram Host is moving to new time After running Timeout callback:: count: 0 @@ -330,11 +412,15 @@ Synchronizing program CreatingProgramWith:: roots: ["/user/username/projects/myproject/worker.ts"] - options: {"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} -worker.ts:1:1 - error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. + options: {"types":["node"],"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +error TS2688: Cannot find type definition file for 'node'. + The file is in the program because: + Entry point of type library 'node' specified in compilerOptions -1 process.on("uncaughtException"); -  ~~~~~~~ + tsconfig.json:4:7 + 4 "node" +    ~~~~~~ + File is entry point of type library specified here. [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -346,6 +432,9 @@ Program root files: [ "/user/username/projects/myproject/worker.ts" ] Program options: { + "types": [ + "node" + ], "watch": true, "extendedDiagnostics": true, "configFilePath": "/user/username/projects/myproject/tsconfig.json" @@ -355,7 +444,7 @@ Program files:: /home/src/tslibs/TS/Lib/lib.d.ts /user/username/projects/myproject/worker.ts -Semantic diagnostics in builder refreshed for:: +No cached semantic diagnostics in the builder:: No shapes updated in the builder:: @@ -384,29 +473,27 @@ declare namespace NodeJS { Output:: -DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots -Scheduling update +DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations Scheduling invalidateFailedLookup -Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots +Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Scheduling update Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/base.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory -DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots -Scheduling update +DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations Scheduling invalidateFailedLookup, Cancelled earlier one -Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots +Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Project: /user/username/projects/myproject/tsconfig.json Detected file add/remove of non supported extension: /user/username/projects/myproject/node_modules/@types/node/ts3.6 Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node/ts3.6 :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Timeout callback:: count: 2 -36: timerToUpdateProgram *new* -37: timerToInvalidateFailedLookupResolutions *new* +29: timerToUpdateProgram *new* +30: timerToInvalidateFailedLookupResolutions *new* Before running Timeout callback:: count: 2 -36: timerToUpdateProgram -37: timerToInvalidateFailedLookupResolutions +29: timerToUpdateProgram +30: timerToInvalidateFailedLookupResolutions After running Timeout callback:: count: 0 Output:: @@ -416,19 +503,67 @@ Synchronizing program CreatingProgramWith:: roots: ["/user/username/projects/myproject/worker.ts"] - options: {"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} -worker.ts:1:1 - error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - -1 process.on("uncaughtException"); -  ~~~~~~~ - -[HH:MM:SS AM] Found 1 error. Watching for file changes. + options: {"types":["node"],"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/index.d.ts 250 undefined Source file +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/base.d.ts 250 undefined Source file +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts 250 undefined Source file +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/globals.d.ts 250 undefined Source file +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /user/username/projects/package.json 2000 undefined File location affecting resolution +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/ts3.6/package.json 2000 undefined File location affecting resolution +DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules 1 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules 1 undefined Failed Lookup Locations +[HH:MM:SS AM] Found 0 errors. Watching for file changes. +//// [/user/username/projects/myproject/worker.js] file written with same contents + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types/node/package.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/node_modules/@types/node/ts3.6/package.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/node_modules/@types/package.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/node_modules/package.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/package.json: *new* + {"pollingInterval":2000} +/user/username/projects/package.json: *new* + {"pollingInterval":2000} + +PolledWatches *deleted*:: +/user/username/projects/node_modules: + {"pollingInterval":500} + +FsWatches:: +/home/src/tslibs/TS/Lib/lib.d.ts: + {} +/user/username/projects/myproject/node_modules/@types/node/base.d.ts: *new* + {} +/user/username/projects/myproject/node_modules/@types/node/globals.d.ts: *new* + {} +/user/username/projects/myproject/node_modules/@types/node/index.d.ts: *new* + {} +/user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts: *new* + {} +/user/username/projects/myproject/tsconfig.json: + {} +/user/username/projects/myproject/worker.ts: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject: + {} +/user/username/projects/myproject/node_modules: + {} Timeout callback:: count: 0 -37: timerToInvalidateFailedLookupResolutions *deleted* +30: timerToInvalidateFailedLookupResolutions *deleted* Before running Timeout callback:: count: 0 @@ -439,6 +574,9 @@ Program root files: [ "/user/username/projects/myproject/worker.ts" ] Program options: { + "types": [ + "node" + ], "watch": true, "extendedDiagnostics": true, "configFilePath": "/user/username/projects/myproject/tsconfig.json" @@ -447,9 +585,24 @@ Program structureReused: SafeModules Program files:: /home/src/tslibs/TS/Lib/lib.d.ts /user/username/projects/myproject/worker.ts +/user/username/projects/myproject/node_modules/@types/node/globals.d.ts +/user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts +/user/username/projects/myproject/node_modules/@types/node/base.d.ts +/user/username/projects/myproject/node_modules/@types/node/index.d.ts Semantic diagnostics in builder refreshed for:: +/home/src/tslibs/TS/Lib/lib.d.ts +/user/username/projects/myproject/worker.ts +/user/username/projects/myproject/node_modules/@types/node/globals.d.ts +/user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts +/user/username/projects/myproject/node_modules/@types/node/base.d.ts +/user/username/projects/myproject/node_modules/@types/node/index.d.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/user/username/projects/myproject/node_modules/@types/node/globals.d.ts (used version) +/user/username/projects/myproject/worker.ts (computed .d.ts) +/user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts (used version) +/user/username/projects/myproject/node_modules/@types/node/base.d.ts (used version) +/user/username/projects/myproject/node_modules/@types/node/index.d.ts (used version) exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsserver/configuredProjects/should-be-able-to-handle-@types-if-input-file-list-is-empty.js b/tests/baselines/reference/tsserver/configuredProjects/should-be-able-to-handle-@types-if-input-file-list-is-empty.js index f2b7c95444b..bcc9c1b2ae8 100644 --- a/tests/baselines/reference/tsserver/configuredProjects/should-be-able-to-handle-@types-if-input-file-list-is-empty.js +++ b/tests/baselines/reference/tsserver/configuredProjects/should-be-able-to-handle-@types-if-input-file-list-is-empty.js @@ -8,7 +8,11 @@ let x = 1 //// [/user/username/projects/project/a/tsconfig.json] { - "compiler": {}, + "compilerOptions": { + "types": [ + "typings" + ] + }, "files": [] } @@ -48,6 +52,9 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/project Info seq [hh:mm:ss:mss] Config: /user/username/projects/project/a/tsconfig.json : { "rootNames": [], "options": { + "types": [ + "typings" + ], "configFilePath": "/user/username/projects/project/a/tsconfig.json" } } @@ -62,12 +69,6 @@ Info seq [hh:mm:ss:mss] event: } } Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /user/username/projects/project/a/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/project/a/node_modules/@types 1 undefined Project: /user/username/projects/project/a/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/project/a/node_modules/@types 1 undefined Project: /user/username/projects/project/a/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/project/node_modules/@types 1 undefined Project: /user/username/projects/project/a/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/project/node_modules/@types 1 undefined Project: /user/username/projects/project/a/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/project/a/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/project/a/tsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /user/username/projects/project/a/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/user/username/projects/project/a/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (0) @@ -105,7 +106,11 @@ Info seq [hh:mm:ss:mss] event: "deferred": 0, "deferredSize": 0 }, - "compilerOptions": {}, + "compilerOptions": { + "types": [ + "" + ] + }, "typeAcquisition": { "enable": false, "include": false, @@ -134,11 +139,11 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [ { "start": { - "line": 3, + "line": 7, "offset": 12 }, "end": { - "line": 3, + "line": 7, "offset": 14 }, "text": "The 'files' list in config file '/user/username/projects/project/a/tsconfig.json' is empty.", diff --git a/tests/baselines/reference/tsserver/getMoveToRefactoringFileSuggestions/works-for-suggesting-a-list-of-files,-excluding-node_modules-within-a-project.js b/tests/baselines/reference/tsserver/getMoveToRefactoringFileSuggestions/works-for-suggesting-a-list-of-files,-excluding-node_modules-within-a-project.js index 6e80e619902..7a8271183f3 100644 --- a/tests/baselines/reference/tsserver/getMoveToRefactoringFileSuggestions/works-for-suggesting-a-list-of-files,-excluding-node_modules-within-a-project.js +++ b/tests/baselines/reference/tsserver/getMoveToRefactoringFileSuggestions/works-for-suggesting-a-list-of-files,-excluding-node_modules-within-a-project.js @@ -26,7 +26,13 @@ export const value = 0; export const value1 = 0; //// [/home/src/projects/project/tsconfig.json] -{} +{ + "compilerOptions": { + "types": [ + "node" + ] + } +} //// [/home/src/tslibs/TS/Lib/lib.d.ts] interface Boolean {} @@ -63,6 +69,9 @@ Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/tsconfig.json : { "/home/src/projects/project/d/e/file3.ts" ], "options": { + "types": [ + "node" + ], "configFilePath": "/home/src/projects/project/tsconfig.json" } } @@ -86,6 +95,8 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/project Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types/node/package.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types/package.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: File location affecting resolution @@ -93,10 +104,6 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/pro Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/package.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/package.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/.cache/package.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: File location affecting resolution -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (7) @@ -157,7 +164,11 @@ Info seq [hh:mm:ss:mss] event: "deferred": 0, "deferredSize": 0 }, - "compilerOptions": {}, + "compilerOptions": { + "types": [ + "" + ] + }, "typeAcquisition": { "enable": false, "include": false, @@ -183,7 +194,31 @@ Info seq [hh:mm:ss:mss] event: "body": { "triggerFile": "/home/src/projects/project/a/file1.ts", "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [] + "diagnostics": [ + { + "text": "Cannot find type definition file for 'node'.\n The file is in the program because:\n Entry point of type library 'node' specified in compilerOptions", + "code": 2688, + "category": "error", + "relatedInformation": [ + { + "span": { + "start": { + "line": 4, + "offset": 7 + }, + "end": { + "line": 4, + "offset": 13 + }, + "file": "/home/src/projects/project/tsconfig.json" + }, + "message": "File is entry point of type library specified here.", + "category": "message", + "code": 1419 + } + ] + } + ] } } Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) @@ -207,7 +242,7 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: -/home/src/projects/node_modules/@types: *new* +/home/src/projects/node_modules: *new* {"pollingInterval":500} /home/src/projects/package.json: *new* {"pollingInterval":2000} @@ -239,8 +274,6 @@ FsWatchesRecursive:: {} /home/src/projects/project/node_modules: *new* {} -/home/src/projects/project/node_modules/@types: *new* - {} Projects:: /home/src/projects/project/tsconfig.json (Configured) *new* diff --git a/tests/baselines/reference/tsserver/resolutionCache/works-correctly-when-typings-are-added-or-removed.js b/tests/baselines/reference/tsserver/resolutionCache/works-correctly-when-typings-are-added-or-removed.js index b940acefa68..0d4e8c5cef4 100644 --- a/tests/baselines/reference/tsserver/resolutionCache/works-correctly-when-typings-are-added-or-removed.js +++ b/tests/baselines/reference/tsserver/resolutionCache/works-correctly-when-typings-are-added-or-removed.js @@ -11,7 +11,12 @@ export let a: number //// [/users/username/projects/project/tsconfig.json] { - "compilerOptions": {}, + "compilerOptions": { + "types": [ + "lib1", + "lib2" + ] + }, "exclude": [ "node_modules" ] @@ -49,6 +54,10 @@ Info seq [hh:mm:ss:mss] Config: /users/username/projects/project/tsconfig.json "/users/username/projects/project/app.ts" ], "options": { + "types": [ + "lib1", + "lib2" + ], "configFilePath": "/users/username/projects/project/tsconfig.json" } } @@ -65,22 +74,32 @@ Info seq [hh:mm:ss:mss] event: Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/project 1 undefined Config: /users/username/projects/project/tsconfig.json WatchType: Wild card directory Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/project 1 undefined Config: /users/username/projects/project/tsconfig.json WatchType: Wild card directory Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/username/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/project/node_modules 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/project/node_modules 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/node_modules 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/node_modules 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/lib.d.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/project/node_modules/@types 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/project/node_modules/@types 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/node_modules/@types 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/node_modules/@types 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/username/projects/project/node_modules/@types/lib1/package.json 2000 undefined Project: /users/username/projects/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/username/projects/project/node_modules/@types/package.json 2000 undefined Project: /users/username/projects/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/username/projects/project/node_modules/package.json 2000 undefined Project: /users/username/projects/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/username/projects/project/package.json 2000 undefined Project: /users/username/projects/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/username/projects/package.json 2000 undefined Project: /users/username/projects/project/tsconfig.json WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/username/projects/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/username/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) +Info seq [hh:mm:ss:mss] Files (3) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "interface 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 {}\ndeclare const console: { log(msg: any): void; };" /users/username/projects/project/app.ts SVC-1-0 "let x = 1;" + /users/username/projects/project/node_modules/@types/lib1/index.d.ts Text-1 "export let a: number" ../../../../home/src/tslibs/TS/Lib/lib.d.ts Default library for target 'es5' app.ts Matched by default include pattern '**/*' + node_modules/@types/lib1/index.d.ts + Entry point of type library 'lib1' specified in compilerOptions Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] event: @@ -110,12 +129,17 @@ Info seq [hh:mm:ss:mss] event: "tsSize": 10, "tsx": 0, "tsxSize": 0, - "dts": 1, - "dtsSize": 374, + "dts": 2, + "dtsSize": 394, "deferred": 0, "deferredSize": 0 }, - "compilerOptions": {}, + "compilerOptions": { + "types": [ + "", + "" + ] + }, "typeAcquisition": { "enable": false, "include": false, @@ -141,11 +165,35 @@ Info seq [hh:mm:ss:mss] event: "body": { "triggerFile": "/users/username/projects/project/app.ts", "configFile": "/users/username/projects/project/tsconfig.json", - "diagnostics": [] + "diagnostics": [ + { + "text": "Cannot find type definition file for 'lib2'.\n The file is in the program because:\n Entry point of type library 'lib2' specified in compilerOptions", + "code": 2688, + "category": "error", + "relatedInformation": [ + { + "span": { + "start": { + "line": 5, + "offset": 7 + }, + "end": { + "line": 5, + "offset": 13 + }, + "file": "/users/username/projects/project/tsconfig.json" + }, + "message": "File is entry point of type library specified here.", + "category": "message", + "code": 1419 + } + ] + } + ] } } Info seq [hh:mm:ss:mss] Project '/users/username/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: @@ -165,8 +213,18 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: -/users/username/projects/node_modules/@types: *new* +/users/username/projects/node_modules: *new* {"pollingInterval":500} +/users/username/projects/package.json: *new* + {"pollingInterval":2000} +/users/username/projects/project/node_modules/@types/lib1/package.json: *new* + {"pollingInterval":2000} +/users/username/projects/project/node_modules/@types/package.json: *new* + {"pollingInterval":2000} +/users/username/projects/project/node_modules/package.json: *new* + {"pollingInterval":2000} +/users/username/projects/project/package.json: *new* + {"pollingInterval":2000} FsWatches:: /home/src/tslibs/TS/Lib/lib.d.ts: *new* @@ -177,7 +235,7 @@ FsWatches:: FsWatchesRecursive:: /users/username/projects/project: *new* {} -/users/username/projects/project/node_modules/@types: *new* +/users/username/projects/project/node_modules: *new* {} Projects:: @@ -195,25 +253,33 @@ ScriptInfos:: version: SVC-1-0 containingProjects: 1 /users/username/projects/project/tsconfig.json *default* +/users/username/projects/project/node_modules/@types/lib1/index.d.ts *new* + version: Text-1 + containingProjects: 1 + /users/username/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib1/index.d.ts :: WatchInfo: /users/username/projects/project/node_modules/@types 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib1/index.d.ts :: WatchInfo: /users/username/projects/project/node_modules 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Scheduled: /users/username/projects/project/tsconfig.jsonFailedLookupInvalidation +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib1/index.d.ts :: WatchInfo: /users/username/projects/project/node_modules 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib1/index.d.ts :: WatchInfo: /users/username/projects/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache Info seq [hh:mm:ss:mss] Scheduled: /users/username/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Scheduled: /users/username/projects/project/tsconfig.jsonFailedLookupInvalidation -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib1/index.d.ts :: WatchInfo: /users/username/projects/project/node_modules/@types 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Scheduled: /users/username/projects/project/tsconfig.json, Cancelled earlier one +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib1/index.d.ts :: WatchInfo: /users/username/projects/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib1/index.d.ts :: WatchInfo: /users/username/projects/project 1 undefined Config: /users/username/projects/project/tsconfig.json WatchType: Wild card directory Info seq [hh:mm:ss:mss] Project: /users/username/projects/project/tsconfig.json Detected excluded file: /users/username/projects/project/node_modules/@types/lib1/index.d.ts Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib1/index.d.ts :: WatchInfo: /users/username/projects/project 1 undefined Config: /users/username/projects/project/tsconfig.json WatchType: Wild card directory Before running Timeout callback:: count: 3 -1: /users/username/projects/project/tsconfig.json -2: *ensureProjectForOpenFiles* -3: /users/username/projects/project/tsconfig.jsonFailedLookupInvalidation +1: /users/username/projects/project/tsconfig.jsonFailedLookupInvalidation +4: /users/username/projects/project/tsconfig.json +5: *ensureProjectForOpenFiles* //// [/users/username/projects/project/node_modules/@types/lib1/index.d.ts] deleted Timeout callback:: count: 3 -1: /users/username/projects/project/tsconfig.json *new* -2: *ensureProjectForOpenFiles* *new* -3: /users/username/projects/project/tsconfig.jsonFailedLookupInvalidation *new* +1: /users/username/projects/project/tsconfig.jsonFailedLookupInvalidation *new* +4: /users/username/projects/project/tsconfig.json *new* +5: *ensureProjectForOpenFiles* *new* Projects:: /users/username/projects/project/tsconfig.json (Configured) *changed* @@ -222,15 +288,101 @@ Projects:: dirty: true *changed* autoImportProviderHost: false +ScriptInfos:: +/home/src/tslibs/TS/Lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /users/username/projects/project/tsconfig.json +/users/username/projects/project/app.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /users/username/projects/project/tsconfig.json *default* +/users/username/projects/project/node_modules/@types/lib1/index.d.ts *changed* + version: Text-1 + pendingReloadFromDisk: true *changed* + deferredDelete: true *changed* + containingProjects: 0 *changed* + /users/username/projects/project/tsconfig.json *deleted* + +Info seq [hh:mm:ss:mss] Running: /users/username/projects/project/tsconfig.jsonFailedLookupInvalidation Info seq [hh:mm:ss:mss] Running: /users/username/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/username/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/username/projects/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/username/projects/project/node_modules/@types/lib1/package.json 2000 undefined Project: /users/username/projects/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/username/projects/project/node_modules/@types/package.json 2000 undefined Project: /users/username/projects/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/username/projects/project/node_modules/package.json 2000 undefined Project: /users/username/projects/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/username/projects/project/package.json 2000 undefined Project: /users/username/projects/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/username/projects/package.json 2000 undefined Project: /users/username/projects/project/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/username/projects/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/username/projects/project/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "interface 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 {}\ndeclare const console: { log(msg: any): void; };" /users/username/projects/project/app.ts SVC-1-0 "let x = 1;" + + + ../../../../home/src/tslibs/TS/Lib/lib.d.ts + Default library for target 'es5' + app.ts + Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/users/username/projects/project/tsconfig.json", + "configFile": "/users/username/projects/project/tsconfig.json", + "diagnostics": [ + { + "text": "Cannot find type definition file for 'lib1'.\n The file is in the program because:\n Entry point of type library 'lib1' specified in compilerOptions", + "code": 2688, + "category": "error", + "relatedInformation": [ + { + "span": { + "start": { + "line": 4, + "offset": 7 + }, + "end": { + "line": 4, + "offset": 13 + }, + "file": "/users/username/projects/project/tsconfig.json" + }, + "message": "File is entry point of type library specified here.", + "category": "message", + "code": 1419 + } + ] + }, + { + "text": "Cannot find type definition file for 'lib2'.\n The file is in the program because:\n Entry point of type library 'lib2' specified in compilerOptions", + "code": 2688, + "category": "error", + "relatedInformation": [ + { + "span": { + "start": { + "line": 5, + "offset": 7 + }, + "end": { + "line": 5, + "offset": 13 + }, + "file": "/users/username/projects/project/tsconfig.json" + }, + "message": "File is entry point of type library specified here.", + "category": "message", + "code": 1419 + } + ] + } + ] + } + } Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/users/username/projects/project/tsconfig.json' (Configured) @@ -262,98 +414,77 @@ Info seq [hh:mm:ss:mss] event: } After running Timeout callback:: count: 0 -Timeout callback:: count: 0 -3: /users/username/projects/project/tsconfig.jsonFailedLookupInvalidation *deleted* +PolledWatches:: +/users/username/projects/node_modules: + {"pollingInterval":500} + +PolledWatches *deleted*:: +/users/username/projects/package.json: + {"pollingInterval":2000} +/users/username/projects/project/node_modules/@types/lib1/package.json: + {"pollingInterval":2000} +/users/username/projects/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/users/username/projects/project/node_modules/package.json: + {"pollingInterval":2000} +/users/username/projects/project/package.json: + {"pollingInterval":2000} + +FsWatches:: +/home/src/tslibs/TS/Lib/lib.d.ts: + {} +/users/username/projects/project/tsconfig.json: + {} + +FsWatchesRecursive:: +/users/username/projects/project: + {} +/users/username/projects/project/node_modules: + {} Projects:: /users/username/projects/project/tsconfig.json (Configured) *changed* projectStateVersion: 2 projectProgramVersion: 2 *changed* dirty: false *changed* - autoImportProviderHost: false + autoImportProviderHost: undefined *changed* -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib2 :: WatchInfo: /users/username/projects/project/node_modules/@types 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Scheduled: /users/username/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib2 :: WatchInfo: /users/username/projects/project/node_modules 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Scheduled: /users/username/projects/project/tsconfig.jsonFailedLookupInvalidation -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib2 :: WatchInfo: /users/username/projects/project/node_modules/@types 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib2 :: WatchInfo: /users/username/projects/project/node_modules 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib2 :: WatchInfo: /users/username/projects/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib2 :: WatchInfo: /users/username/projects/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib2 :: WatchInfo: /users/username/projects/project 1 undefined Config: /users/username/projects/project/tsconfig.json WatchType: Wild card directory Info seq [hh:mm:ss:mss] Project: /users/username/projects/project/tsconfig.json Detected excluded file: /users/username/projects/project/node_modules/@types/lib2 Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib2 :: WatchInfo: /users/username/projects/project 1 undefined Config: /users/username/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib2/index.d.ts :: WatchInfo: /users/username/projects/project/node_modules/@types 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Scheduled: /users/username/projects/project/tsconfig.json, Cancelled earlier one -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib2/index.d.ts :: WatchInfo: /users/username/projects/project/node_modules 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Scheduled: /users/username/projects/project/tsconfig.jsonFailedLookupInvalidation, Cancelled earlier one -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib2/index.d.ts :: WatchInfo: /users/username/projects/project/node_modules/@types 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib2/index.d.ts :: WatchInfo: /users/username/projects/project/node_modules 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib2/index.d.ts :: WatchInfo: /users/username/projects/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib2/index.d.ts :: WatchInfo: /users/username/projects/project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib2/index.d.ts :: WatchInfo: /users/username/projects/project 1 undefined Config: /users/username/projects/project/tsconfig.json WatchType: Wild card directory Info seq [hh:mm:ss:mss] Project: /users/username/projects/project/tsconfig.json Detected excluded file: /users/username/projects/project/node_modules/@types/lib2/index.d.ts Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /users/username/projects/project/node_modules/@types/lib2/index.d.ts :: WatchInfo: /users/username/projects/project 1 undefined Config: /users/username/projects/project/tsconfig.json WatchType: Wild card directory -Before running Timeout callback:: count: 3 -7: /users/username/projects/project/tsconfig.json -8: *ensureProjectForOpenFiles* -9: /users/username/projects/project/tsconfig.jsonFailedLookupInvalidation +Before running Timeout callback:: count: 1 +7: /users/username/projects/project/tsconfig.jsonFailedLookupInvalidation //// [/users/username/projects/project/node_modules/@types/lib2/index.d.ts] export let b: number -Timeout callback:: count: 3 -7: /users/username/projects/project/tsconfig.json *new* -8: *ensureProjectForOpenFiles* *new* -9: /users/username/projects/project/tsconfig.jsonFailedLookupInvalidation *new* +Timeout callback:: count: 1 +7: /users/username/projects/project/tsconfig.jsonFailedLookupInvalidation *new* + +Info seq [hh:mm:ss:mss] Running: /users/username/projects/project/tsconfig.jsonFailedLookupInvalidation +Info seq [hh:mm:ss:mss] Scheduled: /users/username/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* +After running Timeout callback:: count: 2 + +Timeout callback:: count: 2 +8: /users/username/projects/project/tsconfig.json *new* +9: *ensureProjectForOpenFiles* *new* Projects:: /users/username/projects/project/tsconfig.json (Configured) *changed* projectStateVersion: 3 *changed* projectProgramVersion: 2 dirty: true *changed* - autoImportProviderHost: false - -Info seq [hh:mm:ss:mss] Running: /users/username/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/username/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/username/projects/project/tsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/users/username/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - /home/src/tslibs/TS/Lib/lib.d.ts Text-1 "interface 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 {}\ndeclare const console: { log(msg: any): void; };" - /users/username/projects/project/app.ts SVC-1-0 "let x = 1;" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/users/username/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Open files: -Info seq [hh:mm:ss:mss] FileName: /users/username/projects/project/app.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/username/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/users/username/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Open files: -Info seq [hh:mm:ss:mss] FileName: /users/username/projects/project/app.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /users/username/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] got projects updated in background /users/username/projects/project/app.ts -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectsUpdatedInBackground", - "body": { - "openFiles": [ - "/users/username/projects/project/app.ts" - ] - } - } -After running Timeout callback:: count: 0 - -Timeout callback:: count: 0 -9: /users/username/projects/project/tsconfig.jsonFailedLookupInvalidation *deleted* - -Projects:: -/users/username/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 3 - projectProgramVersion: 3 *changed* - dirty: false *changed* - autoImportProviderHost: false diff --git a/tests/baselines/reference/tsserver/typingsInstaller/external-projects-duplicate-package.js b/tests/baselines/reference/tsserver/typingsInstaller/external-projects-duplicate-package.js index 85d824e9624..0c473886abd 100644 --- a/tests/baselines/reference/tsserver/typingsInstaller/external-projects-duplicate-package.js +++ b/tests/baselines/reference/tsserver/typingsInstaller/external-projects-duplicate-package.js @@ -66,6 +66,14 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/pro Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/package.json 2000 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/package.json 2000 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/package.json 2000 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/a/app/node_modules/@types 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/a/app/node_modules/@types 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/a/node_modules/@types 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/a/node_modules/@types 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Type roots Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/a/app/test.csproj projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/a/app/test.csproj' (External) Info seq [hh:mm:ss:mss] Files (3) @@ -85,12 +93,18 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- TI:: Creating typing installer PolledWatches:: +/home/src/projects/node_modules/@types: *new* + {"pollingInterval":500} /home/src/projects/package.json: *new* {"pollingInterval":2000} /home/src/projects/project/a/app/node_modules: *new* {"pollingInterval":500} +/home/src/projects/project/a/app/node_modules/@types: *new* + {"pollingInterval":500} /home/src/projects/project/a/node_modules: *new* {"pollingInterval":500} +/home/src/projects/project/a/node_modules/@types: *new* + {"pollingInterval":500} /home/src/projects/project/node_modules/@types/node/package.json: *new* {"pollingInterval":2000} /home/src/projects/project/node_modules/@types/package.json: *new* @@ -109,6 +123,8 @@ FsWatches:: FsWatchesRecursive:: /home/src/projects/project/node_modules: *new* {} +/home/src/projects/project/node_modules/@types: *new* + {} Projects:: /home/src/projects/project/a/app/test.csproj (External) *new* @@ -190,10 +206,32 @@ TI:: [hh:mm:ss:mss] Finished typings discovery: { "cachedTypingPaths": [], "newTypingNames": [], - "filesToWatch": [] + "filesToWatch": [ + "/home/src/projects/project/a/b/bower_components", + "/home/src/projects/project/a/b/node_modules", + "/home/src/projects/project/a/app/bower_components", + "/home/src/projects/project/a/app/node_modules" + ] } -TI:: [hh:mm:ss:mss] Closing file watchers for project '/home/src/projects/project/a/app/test.csproj' -TI:: [hh:mm:ss:mss] No watchers are registered for project '/home/src/projects/project/a/app/test.csproj' +TI:: [hh:mm:ss:mss] Sending response: + { + "kind": "action::watchTypingLocations", + "projectName": "/home/src/projects/project/a/app/test.csproj", + "files": [ + "/home/src/projects/project/a/b/bower_components", + "/home/src/projects/project/a/b/node_modules", + "/home/src/projects/project/a/app/bower_components", + "/home/src/projects/project/a/app/node_modules" + ] + } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/a/b/bower_components 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/a/b/bower_components 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/a/b/node_modules 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/a/b/node_modules 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/a/app/bower_components 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/a/app/bower_components 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/a/app/node_modules 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/a/app/node_modules 1 undefined Project: /home/src/projects/project/a/app/test.csproj WatchType: Directory location for typing installer TI:: [hh:mm:ss:mss] Sending response: { "projectName": "/home/src/projects/project/a/app/test.csproj", @@ -294,6 +332,46 @@ Info seq [hh:mm:ss:mss] response: } After request +PolledWatches:: +/home/src/projects/node_modules/@types: + {"pollingInterval":500} +/home/src/projects/package.json: + {"pollingInterval":2000} +/home/src/projects/project/a/app/bower_components: *new* + {"pollingInterval":500} +/home/src/projects/project/a/app/node_modules: + {"pollingInterval":500} +/home/src/projects/project/a/app/node_modules/@types: + {"pollingInterval":500} +/home/src/projects/project/a/b/bower_components: *new* + {"pollingInterval":500} +/home/src/projects/project/a/b/node_modules: *new* + {"pollingInterval":500} +/home/src/projects/project/a/node_modules: + {"pollingInterval":500} +/home/src/projects/project/a/node_modules/@types: + {"pollingInterval":500} +/home/src/projects/project/node_modules/@types/node/package.json: + {"pollingInterval":2000} +/home/src/projects/project/node_modules/@types/package.json: + {"pollingInterval":2000} +/home/src/projects/project/node_modules/package.json: + {"pollingInterval":2000} +/home/src/projects/project/package.json: + {"pollingInterval":2000} + +FsWatches:: +/home/src/projects/project/a/b/app.js: + {} +/home/src/tslibs/TS/Lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/home/src/projects/project/node_modules: + {} +/home/src/projects/project/node_modules/@types: + {} + Projects:: /home/src/projects/project/a/app/test.csproj (External) *changed* projectStateVersion: 1 diff --git a/tests/baselines/reference/typeReferenceDirectives5.js b/tests/baselines/reference/typeReferenceDirectives5.js index 6564a607dde..a25d608bcc6 100644 --- a/tests/baselines/reference/typeReferenceDirectives5.js +++ b/tests/baselines/reference/typeReferenceDirectives5.js @@ -22,24 +22,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); export interface A { x: typeof $; } - - -//// [DtsFileErrors] - - -/app.d.ts(2,15): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - - -==== /app.d.ts (1 errors) ==== - export interface A { - x: typeof $; - ~ -!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - } - -==== /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/tests/baselines/reference/typeReferenceDirectives5.trace.json b/tests/baselines/reference/typeReferenceDirectives5.trace.json index 9dca874c775..e012935dca8 100644 --- a/tests/baselines/reference/typeReferenceDirectives5.trace.json +++ b/tests/baselines/reference/typeReferenceDirectives5.trace.json @@ -13,5 +13,8 @@ "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'. ========" + "======== Module name './ref' was successfully resolved to '/ref.d.ts'. ========", + "======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts'. ========", + "Resolution for type reference directive 'lib' was found in cache from location '/'.", + "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typeReferenceDirectives6.js b/tests/baselines/reference/typeReferenceDirectives6.js index be5c38e2c1e..4541959f45c 100644 --- a/tests/baselines/reference/typeReferenceDirectives6.js +++ b/tests/baselines/reference/typeReferenceDirectives6.js @@ -26,27 +26,3 @@ var y = function () { return x; }; //// [app.d.ts] declare let x: $; declare let y: () => $; - - -//// [DtsFileErrors] - - -/app.d.ts(1,16): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. -/app.d.ts(2,22): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - - -==== /app.d.ts (2 errors) ==== - declare let x: $; - ~ -!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - declare let y: () => $; - ~ -!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. - -==== /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/tests/baselines/reference/typeReferenceDirectives6.trace.json b/tests/baselines/reference/typeReferenceDirectives6.trace.json index d3d582f8eb3..c26f57d965c 100644 --- a/tests/baselines/reference/typeReferenceDirectives6.trace.json +++ b/tests/baselines/reference/typeReferenceDirectives6.trace.json @@ -5,5 +5,8 @@ "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'. ========", + "Resolution for type reference directive 'lib' was found in cache from location '/'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typeReferenceDirectives9.js b/tests/baselines/reference/typeReferenceDirectives9.js index e14cbfdbbac..a5ffdad9bd5 100644 --- a/tests/baselines/reference/typeReferenceDirectives9.js +++ b/tests/baselines/reference/typeReferenceDirectives9.js @@ -78,48 +78,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/tests/baselines/reference/typeReferenceDirectives9.trace.json b/tests/baselines/reference/typeReferenceDirectives9.trace.json index 0b27153c339..fe003289262 100644 --- a/tests/baselines/reference/typeReferenceDirectives9.trace.json +++ b/tests/baselines/reference/typeReferenceDirectives9.trace.json @@ -20,5 +20,8 @@ "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========", "======== Resolving module './main' from '/mod1.ts'. ========", "Resolution for module './main' was found in cache from location '/'.", - "======== Module name './main' was successfully resolved to '/main.ts'. ========" + "======== Module name './main' was successfully resolved to '/main.ts'. ========", + "======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts'. ========", + "Resolution for type reference directive 'lib' was found in cache from location '/'.", + "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typecheckIfCondition.errors.txt b/tests/baselines/reference/typecheckIfCondition.errors.txt index ef675fd5cbb..d665c469bee 100644 --- a/tests/baselines/reference/typecheckIfCondition.errors.txt +++ b/tests/baselines/reference/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/tests/baselines/reference/typingsSuggestion2.errors.txt b/tests/baselines/reference/typingsSuggestion2.errors.txt index c166630f3d5..0e77b575542 100644 --- a/tests/baselines/reference/typingsSuggestion2.errors.txt +++ b/tests/baselines/reference/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/tests/baselines/reference/typingsSuggestionBun2.errors.txt b/tests/baselines/reference/typingsSuggestionBun2.errors.txt index 309dc7e05b3..ff8eedab8ab 100644 --- a/tests/baselines/reference/typingsSuggestionBun2.errors.txt +++ b/tests/baselines/reference/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