diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index b76e6f72268bb..01ce0735a519f 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -1337,7 +1337,7 @@ namespace ts { /* @internal */ export const defaultInitCompilerOptions: CompilerOptions = { module: ModuleKind.CommonJS, - target: ScriptTarget.ES5, + target: ScriptTarget.ES2016, strict: true, esModuleInterop: true, forceConsistentCasingInFileNames: true, diff --git a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json index 96b9d1be78cd4..56794816baf82 100644 --- a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json @@ -11,7 +11,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json index 9c26f5a029727..72a3d537f7adc 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json @@ -11,7 +11,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json index a75d5adbedb87..df5bf12f3e9d9 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json @@ -11,7 +11,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json index 8d75086de68ea..9fb8f59be48cc 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json @@ -11,7 +11,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json index f66c53cd98f16..5bb5a17baa7f3 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json @@ -11,7 +11,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ "lib": ["es5","es2015.promise"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json index 96b9d1be78cd4..56794816baf82 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json @@ -11,7 +11,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json index 85c5394078dc6..9cc8746737d98 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json @@ -11,7 +11,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ "lib": ["es5","es2015.core"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json index 763d33c30bb04..865e5f44b27f5 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json @@ -11,7 +11,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js index ed84c9e43922b..620e1d32717b5 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js @@ -32,7 +32,7 @@ interface Array { length: number; [n: number]: T; } // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ @@ -128,25 +128,49 @@ Output:: >> Screen clear [12:00:25 AM] Starting compilation in watch mode... -[12:00:40 AM] Found 0 errors. Watching for file changes. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2016.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2016' + + tsconfig.json:14:15 + 14 "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ +    ~~~~~~~~ + File is default library for target specified here. + +[12:00:40 AM] Found 11 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts"] -Program options: {"target":1,"module":2,"declaration":true,"declarationDir":"/user/username/projects/myproject/decls","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":3,"module":2,"declaration":true,"declarationDir":"/user/username/projects/myproject/decls","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.d.ts /user/username/projects/myproject/file1.ts /user/username/projects/myproject/src/file2.ts -Semantic diagnostics in builder refreshed for:: -/a/lib/lib.d.ts -/user/username/projects/myproject/file1.ts -/user/username/projects/myproject/src/file2.ts +No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: -/a/lib/lib.d.ts (used version) /user/username/projects/myproject/file1.ts (used version) /user/username/projects/myproject/src/file2.ts (used version) @@ -157,8 +181,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} FsWatches:: @@ -212,8 +236,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} FsWatches:: @@ -239,21 +263,48 @@ Output:: >> Screen clear [12:00:43 AM] File change detected. Starting incremental compilation... -[12:00:48 AM] Found 0 errors. Watching for file changes. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2016.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2016' + + tsconfig.json:14:15 + 14 "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ +    ~~~~~~~~ + File is default library for target specified here. + +[12:00:48 AM] Found 11 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts","/user/username/projects/myproject/src/file3.ts"] -Program options: {"target":1,"module":2,"declaration":true,"declarationDir":"/user/username/projects/myproject/decls","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":3,"module":2,"declaration":true,"declarationDir":"/user/username/projects/myproject/decls","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.d.ts /user/username/projects/myproject/file1.ts /user/username/projects/myproject/src/file2.ts /user/username/projects/myproject/src/file3.ts -Semantic diagnostics in builder refreshed for:: -/user/username/projects/myproject/src/file3.ts +No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/src/file3.ts (computed .d.ts) @@ -265,8 +316,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} /user/username/projects/myproject/src/file3.ts: {"fileName":"/user/username/projects/myproject/src/file3.ts","pollingInterval":250} @@ -309,8 +360,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} /user/username/projects/myproject/src/file3.ts: {"fileName":"/user/username/projects/myproject/src/file3.ts","pollingInterval":250} diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js index 109062bb84503..729c53bff01ef 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js @@ -32,7 +32,7 @@ interface Array { length: number; [n: number]: T; } // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ @@ -128,25 +128,49 @@ Output:: >> Screen clear [12:00:25 AM] Starting compilation in watch mode... -[12:00:46 AM] Found 0 errors. Watching for file changes. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2016.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2016' + + tsconfig.json:14:15 + 14 "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ +    ~~~~~~~~ + File is default library for target specified here. + +[12:00:46 AM] Found 11 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts"] -Program options: {"target":1,"module":2,"declaration":true,"outDir":"/user/username/projects/myproject/build","declarationDir":"/user/username/projects/myproject/decls","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":3,"module":2,"declaration":true,"outDir":"/user/username/projects/myproject/build","declarationDir":"/user/username/projects/myproject/decls","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.d.ts /user/username/projects/myproject/file1.ts /user/username/projects/myproject/src/file2.ts -Semantic diagnostics in builder refreshed for:: -/a/lib/lib.d.ts -/user/username/projects/myproject/file1.ts -/user/username/projects/myproject/src/file2.ts +No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: -/a/lib/lib.d.ts (used version) /user/username/projects/myproject/file1.ts (used version) /user/username/projects/myproject/src/file2.ts (used version) @@ -157,8 +181,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} FsWatches:: @@ -212,8 +236,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} FsWatches:: @@ -239,21 +263,48 @@ Output:: >> Screen clear [12:00:49 AM] File change detected. Starting incremental compilation... -[12:00:54 AM] Found 0 errors. Watching for file changes. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2016.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2016' + + tsconfig.json:14:15 + 14 "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ +    ~~~~~~~~ + File is default library for target specified here. + +[12:00:54 AM] Found 11 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts","/user/username/projects/myproject/src/file3.ts"] -Program options: {"target":1,"module":2,"declaration":true,"outDir":"/user/username/projects/myproject/build","declarationDir":"/user/username/projects/myproject/decls","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":3,"module":2,"declaration":true,"outDir":"/user/username/projects/myproject/build","declarationDir":"/user/username/projects/myproject/decls","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.d.ts /user/username/projects/myproject/file1.ts /user/username/projects/myproject/src/file2.ts /user/username/projects/myproject/src/file3.ts -Semantic diagnostics in builder refreshed for:: -/user/username/projects/myproject/src/file3.ts +No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/src/file3.ts (computed .d.ts) @@ -265,8 +316,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} /user/username/projects/myproject/src/file3.ts: {"fileName":"/user/username/projects/myproject/src/file3.ts","pollingInterval":250} @@ -309,8 +360,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} /user/username/projects/myproject/src/file3.ts: {"fileName":"/user/username/projects/myproject/src/file3.ts","pollingInterval":250} diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js index 4255c9ffedd7f..818170668e7bf 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js @@ -32,7 +32,7 @@ interface Array { length: number; [n: number]: T; } // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ @@ -128,25 +128,49 @@ Output:: >> Screen clear [12:00:25 AM] Starting compilation in watch mode... -[12:00:36 AM] Found 0 errors. Watching for file changes. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2016.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2016' + + tsconfig.json:14:15 + 14 "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ +    ~~~~~~~~ + File is default library for target specified here. + +[12:00:36 AM] Found 11 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts"] -Program options: {"target":1,"module":2,"outDir":"/user/username/projects/myproject/build","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":3,"module":2,"outDir":"/user/username/projects/myproject/build","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.d.ts /user/username/projects/myproject/file1.ts /user/username/projects/myproject/src/file2.ts -Semantic diagnostics in builder refreshed for:: -/a/lib/lib.d.ts -/user/username/projects/myproject/file1.ts -/user/username/projects/myproject/src/file2.ts +No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: -/a/lib/lib.d.ts (used version) /user/username/projects/myproject/file1.ts (used version) /user/username/projects/myproject/src/file2.ts (used version) @@ -157,8 +181,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} FsWatches:: @@ -204,8 +228,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} FsWatches:: @@ -231,21 +255,48 @@ Output:: >> Screen clear [12:00:39 AM] File change detected. Starting incremental compilation... -[12:00:42 AM] Found 0 errors. Watching for file changes. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2016.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2016' + + tsconfig.json:14:15 + 14 "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ +    ~~~~~~~~ + File is default library for target specified here. + +[12:00:42 AM] Found 11 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts","/user/username/projects/myproject/src/file3.ts"] -Program options: {"target":1,"module":2,"outDir":"/user/username/projects/myproject/build","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":3,"module":2,"outDir":"/user/username/projects/myproject/build","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.d.ts /user/username/projects/myproject/file1.ts /user/username/projects/myproject/src/file2.ts /user/username/projects/myproject/src/file3.ts -Semantic diagnostics in builder refreshed for:: -/user/username/projects/myproject/src/file3.ts +No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/src/file3.ts (computed .d.ts) @@ -257,8 +308,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} /user/username/projects/myproject/src/file3.ts: {"fileName":"/user/username/projects/myproject/src/file3.ts","pollingInterval":250} @@ -297,8 +348,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} /user/username/projects/myproject/src/file3.ts: {"fileName":"/user/username/projects/myproject/src/file3.ts","pollingInterval":250} diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js index 2e6117272664a..8ffe44ddab395 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js @@ -32,7 +32,7 @@ interface Array { length: number; [n: number]: T; } // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ @@ -128,15 +128,43 @@ Output:: >> Screen clear [12:00:25 AM] Starting compilation in watch mode... -[12:00:31 AM] Found 0 errors. Watching for file changes. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2016.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2016' + + tsconfig.json:14:15 + 14 "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ +    ~~~~~~~~ + File is default library for target specified here. + +[12:00:31 AM] Found 11 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts"] -Program options: {"target":1,"module":2,"outFile":"/user/username/projects/myproject/build/outFile.js","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":3,"module":2,"outFile":"/user/username/projects/myproject/build/outFile.js","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.d.ts /user/username/projects/myproject/file1.ts /user/username/projects/myproject/src/file2.ts @@ -151,8 +179,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} FsWatches:: @@ -195,8 +223,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} FsWatches:: @@ -222,15 +250,43 @@ Output:: >> Screen clear [12:00:34 AM] File change detected. Starting incremental compilation... -[12:00:38 AM] Found 0 errors. Watching for file changes. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2016.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2016' + + tsconfig.json:14:15 + 14 "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ +    ~~~~~~~~ + File is default library for target specified here. + +[12:00:38 AM] Found 11 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts","/user/username/projects/myproject/src/file3.ts"] -Program options: {"target":1,"module":2,"outFile":"/user/username/projects/myproject/build/outFile.js","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":3,"module":2,"outFile":"/user/username/projects/myproject/build/outFile.js","esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.d.ts /user/username/projects/myproject/file1.ts /user/username/projects/myproject/src/file2.ts /user/username/projects/myproject/src/file3.ts @@ -246,8 +302,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} /user/username/projects/myproject/src/file3.ts: {"fileName":"/user/username/projects/myproject/src/file3.ts","pollingInterval":250} @@ -298,8 +354,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} /user/username/projects/myproject/src/file3.ts: {"fileName":"/user/username/projects/myproject/src/file3.ts","pollingInterval":250} diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified-with-declaration-enabled.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified-with-declaration-enabled.js index 28924e1e61c1d..9850737466e93 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified-with-declaration-enabled.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified-with-declaration-enabled.js @@ -32,7 +32,7 @@ interface Array { length: number; [n: number]: T; } // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ @@ -128,25 +128,49 @@ Output:: >> Screen clear [12:00:25 AM] Starting compilation in watch mode... -[12:00:34 AM] Found 0 errors. Watching for file changes. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2016.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2016' + + tsconfig.json:14:15 + 14 "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ +    ~~~~~~~~ + File is default library for target specified here. + +[12:00:34 AM] Found 11 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts"] -Program options: {"target":1,"module":2,"declaration":true,"esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":3,"module":2,"declaration":true,"esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.d.ts /user/username/projects/myproject/file1.ts /user/username/projects/myproject/src/file2.ts -Semantic diagnostics in builder refreshed for:: -/a/lib/lib.d.ts -/user/username/projects/myproject/file1.ts -/user/username/projects/myproject/src/file2.ts +No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: -/a/lib/lib.d.ts (used version) /user/username/projects/myproject/file1.ts (used version) /user/username/projects/myproject/src/file2.ts (used version) @@ -157,8 +181,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} FsWatches:: @@ -212,8 +236,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} FsWatches:: @@ -239,21 +263,48 @@ Output:: >> Screen clear [12:00:37 AM] File change detected. Starting incremental compilation... -[12:00:42 AM] Found 0 errors. Watching for file changes. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2016.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2016' + + tsconfig.json:14:15 + 14 "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ +    ~~~~~~~~ + File is default library for target specified here. + +[12:00:42 AM] Found 11 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts","/user/username/projects/myproject/src/file3.ts"] -Program options: {"target":1,"module":2,"declaration":true,"esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":3,"module":2,"declaration":true,"esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.d.ts /user/username/projects/myproject/file1.ts /user/username/projects/myproject/src/file2.ts /user/username/projects/myproject/src/file3.ts -Semantic diagnostics in builder refreshed for:: -/user/username/projects/myproject/src/file3.ts +No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/src/file3.ts (computed .d.ts) @@ -265,8 +316,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} /user/username/projects/myproject/src/file3.ts: {"fileName":"/user/username/projects/myproject/src/file3.ts","pollingInterval":250} @@ -309,8 +360,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} /user/username/projects/myproject/src/file3.ts: {"fileName":"/user/username/projects/myproject/src/file3.ts","pollingInterval":250} diff --git a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js index 20fd0c695b90d..3e23fb6d13961 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js +++ b/tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js @@ -32,7 +32,7 @@ interface Array { length: number; [n: number]: T; } // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ @@ -128,25 +128,49 @@ Output:: >> Screen clear [12:00:25 AM] Starting compilation in watch mode... -[12:00:30 AM] Found 0 errors. Watching for file changes. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2016.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2016' + + tsconfig.json:14:15 + 14 "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ +    ~~~~~~~~ + File is default library for target specified here. + +[12:00:30 AM] Found 11 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts"] -Program options: {"target":1,"module":2,"esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":3,"module":2,"esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.d.ts /user/username/projects/myproject/file1.ts /user/username/projects/myproject/src/file2.ts -Semantic diagnostics in builder refreshed for:: -/a/lib/lib.d.ts -/user/username/projects/myproject/file1.ts -/user/username/projects/myproject/src/file2.ts +No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: -/a/lib/lib.d.ts (used version) /user/username/projects/myproject/file1.ts (used version) /user/username/projects/myproject/src/file2.ts (used version) @@ -157,8 +181,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} FsWatches:: @@ -204,8 +228,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} FsWatches:: @@ -231,21 +255,48 @@ Output:: >> Screen clear [12:00:33 AM] File change detected. Starting incremental compilation... -[12:00:36 AM] Found 0 errors. Watching for file changes. +error TS2318: Cannot find global type 'Array'. + +error TS2318: Cannot find global type 'Boolean'. + +error TS2318: Cannot find global type 'CallableFunction'. + +error TS2318: Cannot find global type 'Function'. + +error TS2318: Cannot find global type 'IArguments'. + +error TS2318: Cannot find global type 'NewableFunction'. + +error TS2318: Cannot find global type 'Number'. + +error TS2318: Cannot find global type 'Object'. + +error TS2318: Cannot find global type 'RegExp'. + +error TS2318: Cannot find global type 'String'. + +error TS6053: File '/a/lib/lib.es2016.full.d.ts' not found. + The file is in the program because: + Default library for target 'es2016' + + tsconfig.json:14:15 + 14 "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ +    ~~~~~~~~ + File is default library for target specified here. + +[12:00:36 AM] Found 11 errors. Watching for file changes. Program root files: ["/user/username/projects/myproject/file1.ts","/user/username/projects/myproject/src/file2.ts","/user/username/projects/myproject/src/file3.ts"] -Program options: {"target":1,"module":2,"esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} +Program options: {"target":3,"module":2,"esModuleInterop":true,"forceConsistentCasingInFileNames":true,"strict":true,"skipLibCheck":true,"watch":true,"project":"/user/username/projects/myproject/tsconfig.json","configFilePath":"/user/username/projects/myproject/tsconfig.json"} Program structureReused: Not Program files:: -/a/lib/lib.d.ts /user/username/projects/myproject/file1.ts /user/username/projects/myproject/src/file2.ts /user/username/projects/myproject/src/file3.ts -Semantic diagnostics in builder refreshed for:: -/user/username/projects/myproject/src/file3.ts +No cached semantic diagnostics in the builder:: Shape signatures in builder refreshed for:: /user/username/projects/myproject/src/file3.ts (computed .d.ts) @@ -257,8 +308,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} /user/username/projects/myproject/src/file3.ts: {"fileName":"/user/username/projects/myproject/src/file3.ts","pollingInterval":250} @@ -297,8 +348,8 @@ WatchedFiles:: {"fileName":"/user/username/projects/myproject/file1.ts","pollingInterval":250} /user/username/projects/myproject/src/file2.ts: {"fileName":"/user/username/projects/myproject/src/file2.ts","pollingInterval":250} -/a/lib/lib.d.ts: - {"fileName":"/a/lib/lib.d.ts","pollingInterval":250} +/a/lib/lib.es2016.full.d.ts: + {"fileName":"/a/lib/lib.es2016.full.d.ts","pollingInterval":250} /user/username/projects/myproject/src/file3.ts: {"fileName":"/user/username/projects/myproject/src/file3.ts","pollingInterval":250}