From 63f328fc3a817922d944141991c37210a627ab1d Mon Sep 17 00:00:00 2001
From: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
Date: Wed, 28 Jan 2026 14:09:18 -0800
Subject: [PATCH 01/11] dtsBundler target
---
scripts/dtsBundler.mjs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/dtsBundler.mjs b/scripts/dtsBundler.mjs
index ade134287fe57..969bad7589a43 100644
--- a/scripts/dtsBundler.mjs
+++ b/scripts/dtsBundler.mjs
@@ -73,7 +73,7 @@ function getDeclarationStatement(node) {
return undefined;
}
-const program = ts.createProgram([entrypoint], { target: ts.ScriptTarget.ES5 });
+const program = ts.createProgram([entrypoint], { target: ts.ScriptTarget.ES2015 });
const typeChecker = program.getTypeChecker();
From f1ff6e07b49288510a56d9964a7a4fa5f0abc86e Mon Sep 17 00:00:00 2001
From: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
Date: Thu, 29 Jan 2026 15:55:55 -0800
Subject: [PATCH 02/11] Force ES5 in convertToAsyncFunction tests
---
src/testRunner/unittests/services/convertToAsyncFunction.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/testRunner/unittests/services/convertToAsyncFunction.ts b/src/testRunner/unittests/services/convertToAsyncFunction.ts
index 40249d8b25b81..5ef8a371fe5f0 100644
--- a/src/testRunner/unittests/services/convertToAsyncFunction.ts
+++ b/src/testRunner/unittests/services/convertToAsyncFunction.ts
@@ -414,6 +414,7 @@ function testConvertToAsyncFunction(it: Mocha.PendingTestFunction, caption: stri
}
const host = TestServerHost.createServerHost(files);
const projectService = new TestProjectService(host);
+ projectService.setCompilerOptionsForInferredProjects({ target: ts.server.protocol.ScriptTarget.ES5 });
projectService.openClientFile(file.path);
return ts.first(projectService.inferredProjects).getLanguageService();
}
From c203df7f8a13d5e2b9cd1a620177a62b66e506fc Mon Sep 17 00:00:00 2001
From: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
Date: Thu, 29 Jan 2026 16:29:20 -0800
Subject: [PATCH 03/11] Fix up tests which require a stable target
---
.../unittests/tscWatch/incremental.ts | 5 ++--
.../declarationMapsEnableMapping_NoInline.js | 23 +++++++--------
...rationMapsEnableMapping_NoInlineSources.js | 23 +++++++--------
...clarationMapsGeneratedMapsEnableMapping.js | 21 +++++++-------
...larationMapsGeneratedMapsEnableMapping2.js | 25 ++++++++--------
...larationMapsGeneratedMapsEnableMapping3.js | 29 +++++++++----------
...nnotFindModule_suggestion_falsePositive.ts | 1 +
.../completionEntryForUnionProperty2.ts | 2 ++
.../completionListStaticProtectedMembers2.ts | 8 +++++
.../fourslash/completionOfAwaitPromise6.ts | 2 ++
...rConvertToEsModule_notInCommonjsProject.ts | 1 +
.../declarationMapsEnableMapping_NoInline.ts | 16 +++++-----
...rationMapsEnableMapping_NoInlineSources.ts | 16 +++++-----
...clarationMapsGeneratedMapsEnableMapping.ts | 14 ++++-----
...larationMapsGeneratedMapsEnableMapping2.ts | 16 +++++-----
...larationMapsGeneratedMapsEnableMapping3.ts | 14 ++++-----
...stionOfUnusedVariableWithExternalModule.ts | 13 +++++++--
17 files changed, 118 insertions(+), 111 deletions(-)
diff --git a/src/testRunner/unittests/tscWatch/incremental.ts b/src/testRunner/unittests/tscWatch/incremental.ts
index d9cce42321d01..ab0f8795f10ab 100644
--- a/src/testRunner/unittests/tscWatch/incremental.ts
+++ b/src/testRunner/unittests/tscWatch/incremental.ts
@@ -157,7 +157,7 @@ describe("unittests:: tscWatch:: incremental:: emit file --incremental", () => {
{ currentDirectory: project },
);
const reportDiagnostic = ts.createDiagnosticReporter(system);
- const parsedConfig = ts.parseConfigFileWithSystem("tsconfig.json", {}, /*extendedConfigCache*/ undefined, /*watchOptionsToExtend*/ undefined, system, reportDiagnostic)!;
+ const parsedConfig = ts.parseConfigFileWithSystem("tsconfig.json", { target: ts.ScriptTarget.ES5, module: ts.ModuleKind.AMD }, /*extendedConfigCache*/ undefined, /*watchOptionsToExtend*/ undefined, system, reportDiagnostic)!;
ts.performIncrementalCompilation({
rootNames: parsedConfig.fileNames,
options: parsedConfig.options,
@@ -167,7 +167,7 @@ describe("unittests:: tscWatch:: incremental:: emit file --incremental", () => {
system,
});
- const command = ts.parseConfigFileWithSystem("tsconfig.json", {}, /*extendedConfigCache*/ undefined, /*watchOptionsToExtend*/ undefined, system, ts.noop)!;
+ const command = ts.parseConfigFileWithSystem("tsconfig.json", { target: ts.ScriptTarget.ES5, module: ts.ModuleKind.AMD }, /*extendedConfigCache*/ undefined, /*watchOptionsToExtend*/ undefined, system, ts.noop)!;
const builderProgram = ts.createIncrementalProgram({
rootNames: command.fileNames,
options: command.options,
@@ -200,6 +200,7 @@ describe("unittests:: tscWatch:: incremental:: emit file --incremental", () => {
assert.deepEqual(builderProgram.state.compilerOptions, {
incremental: true,
+ target: ts.ScriptTarget.ES5,
module: ts.ModuleKind.AMD,
configFilePath: config.path,
ignoreDeprecations: "6.0",
diff --git a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInline.js b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInline.js
index a0404c1ec0c94..5ec31fc37a907 100644
--- a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInline.js
+++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInline.js
@@ -8,6 +8,7 @@ Info seq [hh:mm:ss:mss] request:
"arguments": {
"options": {
"module": "commonjs",
+ "target": "es6",
"lib": [
"es5"
],
@@ -17,7 +18,6 @@ Info seq [hh:mm:ss:mss] request:
"declaration": true,
"declarationMap": true,
"newLine": "lf",
- "target": "es5",
"skipDefaultLibCheck": true
}
},
@@ -56,20 +56,17 @@ export interface SomeType {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Foo = void 0;
-var Foo = /** @class */ (function () {
- function Foo() {
- }
- Foo.prototype.methodName = function (propName) { return propName; };
- Foo.prototype.otherMethod = function () {
+class Foo {
+ methodName(propName) { return propName; }
+ otherMethod() {
if (Math.random() > 0.5) {
return { x: 42 };
}
return { y: "yes" };
- };
- return Foo;
-}());
+ }
+}
exports.Foo = Foo;
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTtJQUFBO0lBU0EsQ0FBQztJQVBHLHdCQUFVLEdBQVYsVUFBVyxRQUFrQixJQUFjLE9BQU8sUUFBUSxDQUFDLENBQUMsQ0FBQztJQUM3RCx5QkFBVyxHQUFYO1FBQ0ksSUFBSSxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsR0FBRyxFQUFFLENBQUM7WUFDdEIsT0FBTyxFQUFDLENBQUMsRUFBRSxFQUFFLEVBQUMsQ0FBQztRQUNuQixDQUFDO1FBQ0QsT0FBTyxFQUFDLENBQUMsRUFBRSxLQUFLLEVBQUMsQ0FBQztJQUN0QixDQUFDO0lBQ0wsVUFBQztBQUFELENBQUMsQUFURCxJQVNDO0FBVFksa0JBQUcifQ==
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxNQUFhLEdBQUc7SUFFWixVQUFVLENBQUMsUUFBa0IsSUFBYyxPQUFPLFFBQVEsQ0FBQyxDQUFDLENBQUM7SUFDN0QsV0FBVztRQUNQLElBQUksSUFBSSxDQUFDLE1BQU0sRUFBRSxHQUFHLEdBQUcsRUFBRSxDQUFDO1lBQ3RCLE9BQU8sRUFBQyxDQUFDLEVBQUUsRUFBRSxFQUFDLENBQUM7UUFDbkIsQ0FBQztRQUNELE9BQU8sRUFBQyxDQUFDLEVBQUUsS0FBSyxFQUFDLENBQUM7SUFDdEIsQ0FBQztDQUNKO0FBVEQsa0JBU0MifQ==
//// [/home/src/workspaces/project/index.ts]
export class Foo {
@@ -96,6 +93,7 @@ instance.methodName({member: 12});
{
"compilerOptions": {
"module": "commonjs",
+ "target": "es2015",
"lib": ["es5"],
"strict": false,
"outDir": "./dist",
@@ -126,6 +124,7 @@ Info seq [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
],
"options": {
"module": 1,
+ "target": 2,
"lib": [
"lib.es5.d.ts"
],
@@ -210,7 +209,7 @@ Info seq [hh:mm:ss:mss] Files (4)
/home/src/tslibs/TS/Lib/lib.es5.d.ts Text-1 lib.es5.d.ts-Text
/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
- /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"lib\": [\"es5\"],\n \"strict\": false,\n \"outDir\": \"./dist\",\n \"inlineSourceMap\": true,\n \"declaration\": true,\n \"declarationMap\": true,\n \"newLine\": \"lf\",\n },\n \"files\": [\"/home/src/workspaces/project/index.ts\"],\n}"
+ /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"target\": \"es2015\",\n \"lib\": [\"es5\"],\n \"strict\": false,\n \"outDir\": \"./dist\",\n \"inlineSourceMap\": true,\n \"declaration\": true,\n \"declarationMap\": true,\n \"newLine\": \"lf\",\n },\n \"files\": [\"/home/src/workspaces/project/index.ts\"],\n}"
../../tslibs/TS/Lib/lib.es5.d.ts
@@ -417,7 +416,7 @@ Info seq [hh:mm:ss:mss] response:
{
"name": "/home/src/workspaces/project/dist/index.js",
"writeByteOrderMark": false,
- "text": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Foo = void 0;\nvar Foo = /** @class */ (function () {\n function Foo() {\n }\n Foo.prototype.methodName = function (propName) { return propName; };\n Foo.prototype.otherMethod = function () {\n if (Math.random() > 0.5) {\n return { x: 42 };\n }\n return { y: \"yes\" };\n };\n return Foo;\n}());\nexports.Foo = Foo;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTtJQUFBO0lBU0EsQ0FBQztJQVBHLHdCQUFVLEdBQVYsVUFBVyxRQUFrQixJQUFjLE9BQU8sUUFBUSxDQUFDLENBQUMsQ0FBQztJQUM3RCx5QkFBVyxHQUFYO1FBQ0ksSUFBSSxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsR0FBRyxFQUFFLENBQUM7WUFDdEIsT0FBTyxFQUFDLENBQUMsRUFBRSxFQUFFLEVBQUMsQ0FBQztRQUNuQixDQUFDO1FBQ0QsT0FBTyxFQUFDLENBQUMsRUFBRSxLQUFLLEVBQUMsQ0FBQztJQUN0QixDQUFDO0lBQ0wsVUFBQztBQUFELENBQUMsQUFURCxJQVNDO0FBVFksa0JBQUcifQ=="
+ "text": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Foo = void 0;\nclass Foo {\n methodName(propName) { return propName; }\n otherMethod() {\n if (Math.random() > 0.5) {\n return { x: 42 };\n }\n return { y: \"yes\" };\n }\n}\nexports.Foo = Foo;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxNQUFhLEdBQUc7SUFFWixVQUFVLENBQUMsUUFBa0IsSUFBYyxPQUFPLFFBQVEsQ0FBQyxDQUFDLENBQUM7SUFDN0QsV0FBVztRQUNQLElBQUksSUFBSSxDQUFDLE1BQU0sRUFBRSxHQUFHLEdBQUcsRUFBRSxDQUFDO1lBQ3RCLE9BQU8sRUFBQyxDQUFDLEVBQUUsRUFBRSxFQUFDLENBQUM7UUFDbkIsQ0FBQztRQUNELE9BQU8sRUFBQyxDQUFDLEVBQUUsS0FBSyxFQUFDLENBQUM7SUFDdEIsQ0FBQztDQUNKO0FBVEQsa0JBU0MifQ=="
},
{
"name": "/home/src/workspaces/project/dist/index.d.ts.map",
diff --git a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInlineSources.js b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInlineSources.js
index fb5cd8eb61852..9b3793bda3939 100644
--- a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInlineSources.js
+++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInlineSources.js
@@ -8,6 +8,7 @@ Info seq [hh:mm:ss:mss] request:
"arguments": {
"options": {
"module": "commonjs",
+ "target": "es6",
"lib": [
"es5"
],
@@ -18,7 +19,6 @@ Info seq [hh:mm:ss:mss] request:
"declaration": true,
"declarationMap": true,
"newLine": "lf",
- "target": "es5",
"skipDefaultLibCheck": true
}
},
@@ -57,20 +57,17 @@ export interface SomeType {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Foo = void 0;
-var Foo = /** @class */ (function () {
- function Foo() {
- }
- Foo.prototype.methodName = function (propName) { return propName; };
- Foo.prototype.otherMethod = function () {
+class Foo {
+ methodName(propName) { return propName; }
+ otherMethod() {
if (Math.random() > 0.5) {
return { x: 42 };
}
return { y: "yes" };
- };
- return Foo;
-}());
+ }
+}
exports.Foo = Foo;
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTtJQUFBO0lBU0EsQ0FBQztJQVBHLHdCQUFVLEdBQVYsVUFBVyxRQUFrQixJQUFjLE9BQU8sUUFBUSxDQUFDLENBQUMsQ0FBQztJQUM3RCx5QkFBVyxHQUFYO1FBQ0ksSUFBSSxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsR0FBRyxFQUFFLENBQUM7WUFDdEIsT0FBTyxFQUFDLENBQUMsRUFBRSxFQUFFLEVBQUMsQ0FBQztRQUNuQixDQUFDO1FBQ0QsT0FBTyxFQUFDLENBQUMsRUFBRSxLQUFLLEVBQUMsQ0FBQztJQUN0QixDQUFDO0lBQ0wsVUFBQztBQUFELENBQUMsQUFURCxJQVNDO0FBVFksa0JBQUciLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY2xhc3MgRm9vIHtcbiAgICBtZW1iZXI6IHN0cmluZztcbiAgICBtZXRob2ROYW1lKHByb3BOYW1lOiBTb21lVHlwZSk6IFNvbWVUeXBlIHsgcmV0dXJuIHByb3BOYW1lOyB9XG4gICAgb3RoZXJNZXRob2QoKSB7XG4gICAgICAgIGlmIChNYXRoLnJhbmRvbSgpID4gMC41KSB7XG4gICAgICAgICAgICByZXR1cm4ge3g6IDQyfTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4ge3k6IFwieWVzXCJ9O1xuICAgIH1cbn1cblxuZXhwb3J0IGludGVyZmFjZSBTb21lVHlwZSB7XG4gICAgbWVtYmVyOiBudW1iZXI7XG59Il19
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxNQUFhLEdBQUc7SUFFWixVQUFVLENBQUMsUUFBa0IsSUFBYyxPQUFPLFFBQVEsQ0FBQyxDQUFDLENBQUM7SUFDN0QsV0FBVztRQUNQLElBQUksSUFBSSxDQUFDLE1BQU0sRUFBRSxHQUFHLEdBQUcsRUFBRSxDQUFDO1lBQ3RCLE9BQU8sRUFBQyxDQUFDLEVBQUUsRUFBRSxFQUFDLENBQUM7UUFDbkIsQ0FBQztRQUNELE9BQU8sRUFBQyxDQUFDLEVBQUUsS0FBSyxFQUFDLENBQUM7SUFDdEIsQ0FBQztDQUNKO0FBVEQsa0JBU0MiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY2xhc3MgRm9vIHtcbiAgICBtZW1iZXI6IHN0cmluZztcbiAgICBtZXRob2ROYW1lKHByb3BOYW1lOiBTb21lVHlwZSk6IFNvbWVUeXBlIHsgcmV0dXJuIHByb3BOYW1lOyB9XG4gICAgb3RoZXJNZXRob2QoKSB7XG4gICAgICAgIGlmIChNYXRoLnJhbmRvbSgpID4gMC41KSB7XG4gICAgICAgICAgICByZXR1cm4ge3g6IDQyfTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4ge3k6IFwieWVzXCJ9O1xuICAgIH1cbn1cblxuZXhwb3J0IGludGVyZmFjZSBTb21lVHlwZSB7XG4gICAgbWVtYmVyOiBudW1iZXI7XG59Il19
//// [/home/src/workspaces/project/index.ts]
export class Foo {
@@ -97,6 +94,7 @@ instance.methodName({member: 12});
{
"compilerOptions": {
"module": "commonjs",
+ "target": "es2015",
"lib": ["es5"],
"strict": false,
"outDir": "./dist",
@@ -128,6 +126,7 @@ Info seq [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
],
"options": {
"module": 1,
+ "target": 2,
"lib": [
"lib.es5.d.ts"
],
@@ -213,7 +212,7 @@ Info seq [hh:mm:ss:mss] Files (4)
/home/src/tslibs/TS/Lib/lib.es5.d.ts Text-1 lib.es5.d.ts-Text
/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
- /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"lib\": [\"es5\"],\n \"strict\": false,\n \"outDir\": \"./dist\",\n \"inlineSourceMap\": true,\n \"inlineSources\": true,\n \"declaration\": true,\n \"declarationMap\": true,\n \"newLine\": \"lf\",\n },\n \"files\": [\"/home/src/workspaces/project/index.ts\"],\n}"
+ /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"target\": \"es2015\",\n \"lib\": [\"es5\"],\n \"strict\": false,\n \"outDir\": \"./dist\",\n \"inlineSourceMap\": true,\n \"inlineSources\": true,\n \"declaration\": true,\n \"declarationMap\": true,\n \"newLine\": \"lf\",\n },\n \"files\": [\"/home/src/workspaces/project/index.ts\"],\n}"
../../tslibs/TS/Lib/lib.es5.d.ts
@@ -420,7 +419,7 @@ Info seq [hh:mm:ss:mss] response:
{
"name": "/home/src/workspaces/project/dist/index.js",
"writeByteOrderMark": false,
- "text": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Foo = void 0;\nvar Foo = /** @class */ (function () {\n function Foo() {\n }\n Foo.prototype.methodName = function (propName) { return propName; };\n Foo.prototype.otherMethod = function () {\n if (Math.random() > 0.5) {\n return { x: 42 };\n }\n return { y: \"yes\" };\n };\n return Foo;\n}());\nexports.Foo = Foo;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTtJQUFBO0lBU0EsQ0FBQztJQVBHLHdCQUFVLEdBQVYsVUFBVyxRQUFrQixJQUFjLE9BQU8sUUFBUSxDQUFDLENBQUMsQ0FBQztJQUM3RCx5QkFBVyxHQUFYO1FBQ0ksSUFBSSxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsR0FBRyxFQUFFLENBQUM7WUFDdEIsT0FBTyxFQUFDLENBQUMsRUFBRSxFQUFFLEVBQUMsQ0FBQztRQUNuQixDQUFDO1FBQ0QsT0FBTyxFQUFDLENBQUMsRUFBRSxLQUFLLEVBQUMsQ0FBQztJQUN0QixDQUFDO0lBQ0wsVUFBQztBQUFELENBQUMsQUFURCxJQVNDO0FBVFksa0JBQUciLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY2xhc3MgRm9vIHtcbiAgICBtZW1iZXI6IHN0cmluZztcbiAgICBtZXRob2ROYW1lKHByb3BOYW1lOiBTb21lVHlwZSk6IFNvbWVUeXBlIHsgcmV0dXJuIHByb3BOYW1lOyB9XG4gICAgb3RoZXJNZXRob2QoKSB7XG4gICAgICAgIGlmIChNYXRoLnJhbmRvbSgpID4gMC41KSB7XG4gICAgICAgICAgICByZXR1cm4ge3g6IDQyfTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4ge3k6IFwieWVzXCJ9O1xuICAgIH1cbn1cblxuZXhwb3J0IGludGVyZmFjZSBTb21lVHlwZSB7XG4gICAgbWVtYmVyOiBudW1iZXI7XG59Il19"
+ "text": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Foo = void 0;\nclass Foo {\n methodName(propName) { return propName; }\n otherMethod() {\n if (Math.random() > 0.5) {\n return { x: 42 };\n }\n return { y: \"yes\" };\n }\n}\nexports.Foo = Foo;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxNQUFhLEdBQUc7SUFFWixVQUFVLENBQUMsUUFBa0IsSUFBYyxPQUFPLFFBQVEsQ0FBQyxDQUFDLENBQUM7SUFDN0QsV0FBVztRQUNQLElBQUksSUFBSSxDQUFDLE1BQU0sRUFBRSxHQUFHLEdBQUcsRUFBRSxDQUFDO1lBQ3RCLE9BQU8sRUFBQyxDQUFDLEVBQUUsRUFBRSxFQUFDLENBQUM7UUFDbkIsQ0FBQztRQUNELE9BQU8sRUFBQyxDQUFDLEVBQUUsS0FBSyxFQUFDLENBQUM7SUFDdEIsQ0FBQztDQUNKO0FBVEQsa0JBU0MiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY2xhc3MgRm9vIHtcbiAgICBtZW1iZXI6IHN0cmluZztcbiAgICBtZXRob2ROYW1lKHByb3BOYW1lOiBTb21lVHlwZSk6IFNvbWVUeXBlIHsgcmV0dXJuIHByb3BOYW1lOyB9XG4gICAgb3RoZXJNZXRob2QoKSB7XG4gICAgICAgIGlmIChNYXRoLnJhbmRvbSgpID4gMC41KSB7XG4gICAgICAgICAgICByZXR1cm4ge3g6IDQyfTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4ge3k6IFwieWVzXCJ9O1xuICAgIH1cbn1cblxuZXhwb3J0IGludGVyZmFjZSBTb21lVHlwZSB7XG4gICAgbWVtYmVyOiBudW1iZXI7XG59Il19"
},
{
"name": "/home/src/workspaces/project/dist/index.d.ts.map",
diff --git a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping.js b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping.js
index 7c8837ee8061a..eba2b9448970c 100644
--- a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping.js
+++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping.js
@@ -8,6 +8,7 @@ Info seq [hh:mm:ss:mss] request:
"arguments": {
"options": {
"module": "commonjs",
+ "target": "es6",
"lib": [
"es5"
],
@@ -16,7 +17,6 @@ Info seq [hh:mm:ss:mss] request:
"declaration": true,
"declarationMap": true,
"newLine": "lf",
- "target": "es5",
"skipDefaultLibCheck": true
}
},
@@ -55,18 +55,15 @@ export interface SomeType {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Foo = void 0;
-var Foo = /** @class */ (function () {
- function Foo() {
- }
- Foo.prototype.methodName = function (propName) { return propName; };
- Foo.prototype.otherMethod = function () {
+class Foo {
+ methodName(propName) { return propName; }
+ otherMethod() {
if (Math.random() > 0.5) {
return { x: 42 };
}
return { y: "yes" };
- };
- return Foo;
-}());
+ }
+}
exports.Foo = Foo;
@@ -95,6 +92,7 @@ instance.methodName({member: 12});
{
"compilerOptions": {
"module": "commonjs",
+ "target": "es2015",
"lib": ["es5"],
"strict": false,
"outDir": "./dist",
@@ -124,6 +122,7 @@ Info seq [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
],
"options": {
"module": 1,
+ "target": 2,
"lib": [
"lib.es5.d.ts"
],
@@ -207,7 +206,7 @@ Info seq [hh:mm:ss:mss] Files (4)
/home/src/tslibs/TS/Lib/lib.es5.d.ts Text-1 lib.es5.d.ts-Text
/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
- /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"lib\": [\"es5\"],\n \"strict\": false,\n \"outDir\": \"./dist\",\n \"declaration\": true,\n \"declarationMap\": true,\n \"newLine\": \"lf\",\n },\n \"files\": [\"/home/src/workspaces/project/index.ts\"],\n}"
+ /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"target\": \"es2015\",\n \"lib\": [\"es5\"],\n \"strict\": false,\n \"outDir\": \"./dist\",\n \"declaration\": true,\n \"declarationMap\": true,\n \"newLine\": \"lf\",\n },\n \"files\": [\"/home/src/workspaces/project/index.ts\"],\n}"
../../tslibs/TS/Lib/lib.es5.d.ts
@@ -414,7 +413,7 @@ Info seq [hh:mm:ss:mss] response:
{
"name": "/home/src/workspaces/project/dist/index.js",
"writeByteOrderMark": false,
- "text": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Foo = void 0;\nvar Foo = /** @class */ (function () {\n function Foo() {\n }\n Foo.prototype.methodName = function (propName) { return propName; };\n Foo.prototype.otherMethod = function () {\n if (Math.random() > 0.5) {\n return { x: 42 };\n }\n return { y: \"yes\" };\n };\n return Foo;\n}());\nexports.Foo = Foo;\n"
+ "text": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Foo = void 0;\nclass Foo {\n methodName(propName) { return propName; }\n otherMethod() {\n if (Math.random() > 0.5) {\n return { x: 42 };\n }\n return { y: \"yes\" };\n }\n}\nexports.Foo = Foo;\n"
},
{
"name": "/home/src/workspaces/project/dist/index.d.ts.map",
diff --git a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping2.js b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping2.js
index 16243b911c4fc..2999f4e3b3168 100644
--- a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping2.js
+++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping2.js
@@ -8,6 +8,7 @@ Info seq [hh:mm:ss:mss] request:
"arguments": {
"options": {
"module": "commonjs",
+ "target": "es6",
"lib": [
"es5"
],
@@ -18,7 +19,6 @@ Info seq [hh:mm:ss:mss] request:
"declaration": true,
"declarationMap": true,
"newLine": "lf",
- "target": "es5",
"skipDefaultLibCheck": true
}
},
@@ -57,23 +57,20 @@ export interface SomeType {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Foo = void 0;
-var Foo = /** @class */ (function () {
- function Foo() {
- }
- Foo.prototype.methodName = function (propName) { return propName; };
- Foo.prototype.otherMethod = function () {
+class Foo {
+ methodName(propName) { return propName; }
+ otherMethod() {
if (Math.random() > 0.5) {
return { x: 42 };
}
return { y: "yes" };
- };
- return Foo;
-}());
+ }
+}
exports.Foo = Foo;
//# sourceMappingURL=index.js.map
//// [/home/src/workspaces/project/dist/index.js.map]
-{"version":3,"file":"index.js","sourceRoot":"/home/src/workspaces/project/","sources":["index.ts"],"names":[],"mappings":";;;AAAA;IAAA;IASA,CAAC;IAPG,wBAAU,GAAV,UAAW,QAAkB,IAAc,OAAO,QAAQ,CAAC,CAAC,CAAC;IAC7D,yBAAW,GAAX;QACI,IAAI,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,EAAE,CAAC;YACtB,OAAO,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC;QACnB,CAAC;QACD,OAAO,EAAC,CAAC,EAAE,KAAK,EAAC,CAAC;IACtB,CAAC;IACL,UAAC;AAAD,CAAC,AATD,IASC;AATY,kBAAG"}
+{"version":3,"file":"index.js","sourceRoot":"/home/src/workspaces/project/","sources":["index.ts"],"names":[],"mappings":";;;AAAA,MAAa,GAAG;IAEZ,UAAU,CAAC,QAAkB,IAAc,OAAO,QAAQ,CAAC,CAAC,CAAC;IAC7D,WAAW;QACP,IAAI,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,EAAE,CAAC;YACtB,OAAO,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC;QACnB,CAAC;QACD,OAAO,EAAC,CAAC,EAAE,KAAK,EAAC,CAAC;IACtB,CAAC;CACJ;AATD,kBASC"}
//// [/home/src/workspaces/project/index.ts]
export class Foo {
@@ -100,6 +97,7 @@ instance.methodName({member: 12});
{
"compilerOptions": {
"module": "commonjs",
+ "target": "es2015",
"lib": ["es5"],
"strict": false,
"outDir": "./dist",
@@ -131,6 +129,7 @@ Info seq [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
],
"options": {
"module": 1,
+ "target": 2,
"lib": [
"lib.es5.d.ts"
],
@@ -216,7 +215,7 @@ Info seq [hh:mm:ss:mss] Files (4)
/home/src/tslibs/TS/Lib/lib.es5.d.ts Text-1 lib.es5.d.ts-Text
/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
- /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"lib\": [\"es5\"],\n \"strict\": false,\n \"outDir\": \"./dist\",\n \"sourceMap\": true,\n \"sourceRoot\": \"/home/src/workspaces/project/\",\n \"declaration\": true,\n \"declarationMap\": true,\n \"newLine\": \"lf\",\n },\n \"files\": [\"/home/src/workspaces/project/index.ts\"],\n}"
+ /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"target\": \"es2015\",\n \"lib\": [\"es5\"],\n \"strict\": false,\n \"outDir\": \"./dist\",\n \"sourceMap\": true,\n \"sourceRoot\": \"/home/src/workspaces/project/\",\n \"declaration\": true,\n \"declarationMap\": true,\n \"newLine\": \"lf\",\n },\n \"files\": [\"/home/src/workspaces/project/index.ts\"],\n}"
../../tslibs/TS/Lib/lib.es5.d.ts
@@ -423,12 +422,12 @@ Info seq [hh:mm:ss:mss] response:
{
"name": "/home/src/workspaces/project/dist/index.js.map",
"writeByteOrderMark": false,
- "text": "{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"/home/src/workspaces/project/\",\"sources\":[\"index.ts\"],\"names\":[],\"mappings\":\";;;AAAA;IAAA;IASA,CAAC;IAPG,wBAAU,GAAV,UAAW,QAAkB,IAAc,OAAO,QAAQ,CAAC,CAAC,CAAC;IAC7D,yBAAW,GAAX;QACI,IAAI,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,EAAE,CAAC;YACtB,OAAO,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC;QACnB,CAAC;QACD,OAAO,EAAC,CAAC,EAAE,KAAK,EAAC,CAAC;IACtB,CAAC;IACL,UAAC;AAAD,CAAC,AATD,IASC;AATY,kBAAG\"}"
+ "text": "{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"/home/src/workspaces/project/\",\"sources\":[\"index.ts\"],\"names\":[],\"mappings\":\";;;AAAA,MAAa,GAAG;IAEZ,UAAU,CAAC,QAAkB,IAAc,OAAO,QAAQ,CAAC,CAAC,CAAC;IAC7D,WAAW;QACP,IAAI,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,EAAE,CAAC;YACtB,OAAO,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC;QACnB,CAAC;QACD,OAAO,EAAC,CAAC,EAAE,KAAK,EAAC,CAAC;IACtB,CAAC;CACJ;AATD,kBASC\"}"
},
{
"name": "/home/src/workspaces/project/dist/index.js",
"writeByteOrderMark": false,
- "text": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Foo = void 0;\nvar Foo = /** @class */ (function () {\n function Foo() {\n }\n Foo.prototype.methodName = function (propName) { return propName; };\n Foo.prototype.otherMethod = function () {\n if (Math.random() > 0.5) {\n return { x: 42 };\n }\n return { y: \"yes\" };\n };\n return Foo;\n}());\nexports.Foo = Foo;\n//# sourceMappingURL=index.js.map"
+ "text": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Foo = void 0;\nclass Foo {\n methodName(propName) { return propName; }\n otherMethod() {\n if (Math.random() > 0.5) {\n return { x: 42 };\n }\n return { y: \"yes\" };\n }\n}\nexports.Foo = Foo;\n//# sourceMappingURL=index.js.map"
},
{
"name": "/home/src/workspaces/project/dist/index.d.ts.map",
diff --git a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping3.js b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping3.js
index b03dbdfa902b6..34510caf2fb7d 100644
--- a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping3.js
+++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping3.js
@@ -8,6 +8,7 @@ Info seq [hh:mm:ss:mss] request:
"arguments": {
"options": {
"module": "commonjs",
+ "target": "es6",
"lib": [
"es5"
],
@@ -17,7 +18,6 @@ Info seq [hh:mm:ss:mss] request:
"declaration": true,
"declarationMap": true,
"newLine": "lf",
- "target": "es5",
"skipDefaultLibCheck": true
}
},
@@ -56,18 +56,15 @@ export interface SomeType {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Foo = void 0;
-var Foo = /** @class */ (function () {
- function Foo() {
- }
- Foo.prototype.methodName = function (propName) { return propName; };
- Foo.prototype.otherMethod = function () {
+class Foo {
+ methodName(propName) { return propName; }
+ otherMethod() {
if (Math.random() > 0.5) {
return { x: 42 };
}
return { y: "yes" };
- };
- return Foo;
-}());
+ }
+}
exports.Foo = Foo;
@@ -96,6 +93,7 @@ instance.methodName({member: 12});
{
"compilerOptions": {
"module": "commonjs",
+ "target": "es2015",
"lib": ["es5"],
"strict": false,
"outDir": "./dist",
@@ -126,6 +124,7 @@ Info seq [hh:mm:ss:mss] Config: /home/src/workspaces/project/tsconfig.json : {
],
"options": {
"module": 1,
+ "target": 2,
"lib": [
"lib.es5.d.ts"
],
@@ -196,11 +195,11 @@ Info seq [hh:mm:ss:mss] event:
"diagnostics": [
{
"start": {
- "line": 7,
+ "line": 8,
"offset": 9
},
"end": {
- "line": 7,
+ "line": 8,
"offset": 21
},
"text": "Option 'sourceRoot can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided.",
@@ -225,7 +224,7 @@ Info seq [hh:mm:ss:mss] Files (4)
/home/src/tslibs/TS/Lib/lib.es5.d.ts Text-1 lib.es5.d.ts-Text
/home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text
/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text
- /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"lib\": [\"es5\"],\n \"strict\": false,\n \"outDir\": \"./dist\",\n \"sourceRoot\": \"/home/src/workspaces/project/\",\n \"declaration\": true,\n \"declarationMap\": true,\n \"newLine\": \"lf\",\n },\n \"files\": [\"/home/src/workspaces/project/index.ts\"],\n}"
+ /home/src/workspaces/project/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"target\": \"es2015\",\n \"lib\": [\"es5\"],\n \"strict\": false,\n \"outDir\": \"./dist\",\n \"sourceRoot\": \"/home/src/workspaces/project/\",\n \"declaration\": true,\n \"declarationMap\": true,\n \"newLine\": \"lf\",\n },\n \"files\": [\"/home/src/workspaces/project/index.ts\"],\n}"
../../tslibs/TS/Lib/lib.es5.d.ts
@@ -432,7 +431,7 @@ Info seq [hh:mm:ss:mss] response:
{
"name": "/home/src/workspaces/project/dist/index.js",
"writeByteOrderMark": false,
- "text": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Foo = void 0;\nvar Foo = /** @class */ (function () {\n function Foo() {\n }\n Foo.prototype.methodName = function (propName) { return propName; };\n Foo.prototype.otherMethod = function () {\n if (Math.random() > 0.5) {\n return { x: 42 };\n }\n return { y: \"yes\" };\n };\n return Foo;\n}());\nexports.Foo = Foo;\n"
+ "text": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Foo = void 0;\nclass Foo {\n methodName(propName) { return propName; }\n otherMethod() {\n if (Math.random() > 0.5) {\n return { x: 42 };\n }\n return { y: \"yes\" };\n }\n}\nexports.Foo = Foo;\n"
},
{
"name": "/home/src/workspaces/project/dist/index.d.ts.map",
@@ -471,11 +470,11 @@ Info seq [hh:mm:ss:mss] event:
"diagnostics": [
{
"start": {
- "line": 7,
+ "line": 8,
"offset": 9
},
"end": {
- "line": 7,
+ "line": 8,
"offset": 21
},
"text": "Option 'sourceRoot can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided.",
diff --git a/tests/cases/fourslash/codeFixCannotFindModule_suggestion_falsePositive.ts b/tests/cases/fourslash/codeFixCannotFindModule_suggestion_falsePositive.ts
index c2819fd7d137e..84b6fa2cf7b70 100644
--- a/tests/cases/fourslash/codeFixCannotFindModule_suggestion_falsePositive.ts
+++ b/tests/cases/fourslash/codeFixCannotFindModule_suggestion_falsePositive.ts
@@ -1,6 +1,7 @@
///
// @moduleResolution: bundler
+// @module: commonjs
// @resolveJsonModule: true
// @strict: true
diff --git a/tests/cases/fourslash/completionEntryForUnionProperty2.ts b/tests/cases/fourslash/completionEntryForUnionProperty2.ts
index 0b307a6ef29be..872d21b26ece8 100644
--- a/tests/cases/fourslash/completionEntryForUnionProperty2.ts
+++ b/tests/cases/fourslash/completionEntryForUnionProperty2.ts
@@ -1,5 +1,7 @@
///
+// @lib: es5
+
////interface One {
//// commonProperty: string;
//// commonFunction(): number;
diff --git a/tests/cases/fourslash/completionListStaticProtectedMembers2.ts b/tests/cases/fourslash/completionListStaticProtectedMembers2.ts
index f5c2dadf83c34..17227a11a64c6 100644
--- a/tests/cases/fourslash/completionListStaticProtectedMembers2.ts
+++ b/tests/cases/fourslash/completionListStaticProtectedMembers2.ts
@@ -1,5 +1,6 @@
///
+// @target: es2015
// @lib: es5
////class Base {
@@ -61,10 +62,17 @@ verify.completions(
exact: [
{ name: "protectedMethod", sortText: completion.SortText.LocalDeclarationPriority },
{ name: "protectedOverriddenMethod", sortText: completion.SortText.LocalDeclarationPriority },
+ { name: "protectedOverriddenProperty", sortText: completion.SortText.LocalDeclarationPriority },
+ { name: "protectedProperty", sortText: completion.SortText.LocalDeclarationPriority },
{ name: "publicMethod", sortText: completion.SortText.LocalDeclarationPriority },
+ { name: "publicProperty", sortText: completion.SortText.LocalDeclarationPriority },
{ name: "apply", sortText: completion.SortText.LocationPriority },
+ { name: "arguments", sortText: completion.SortText.LocationPriority },
{ name: "bind", sortText: completion.SortText.LocationPriority },
{ name: "call", sortText: completion.SortText.LocationPriority },
+ { name: "caller", sortText: completion.SortText.LocationPriority },
+ { name: "length", sortText: completion.SortText.LocationPriority },
+ { name: "prototype", sortText: completion.SortText.LocationPriority },
{ name: "toString", sortText: completion.SortText.LocationPriority },
],
},
diff --git a/tests/cases/fourslash/completionOfAwaitPromise6.ts b/tests/cases/fourslash/completionOfAwaitPromise6.ts
index 9d08f67d05891..94e54ff5c9c2e 100644
--- a/tests/cases/fourslash/completionOfAwaitPromise6.ts
+++ b/tests/cases/fourslash/completionOfAwaitPromise6.ts
@@ -1,5 +1,7 @@
///
+// @lib: es2015
+
//// async function foo(x: Promise) {
//// [|x./**/|]
//// }
diff --git a/tests/cases/fourslash/refactorConvertToEsModule_notInCommonjsProject.ts b/tests/cases/fourslash/refactorConvertToEsModule_notInCommonjsProject.ts
index 5286091bce978..0bccc7927e713 100644
--- a/tests/cases/fourslash/refactorConvertToEsModule_notInCommonjsProject.ts
+++ b/tests/cases/fourslash/refactorConvertToEsModule_notInCommonjsProject.ts
@@ -1,6 +1,7 @@
///
// @allowJs: true
+// @target: es5
// @Filename: /a.js
////exports.x = 0;
diff --git a/tests/cases/fourslash/server/declarationMapsEnableMapping_NoInline.ts b/tests/cases/fourslash/server/declarationMapsEnableMapping_NoInline.ts
index 996635f429fbb..ce30c976a72a7 100644
--- a/tests/cases/fourslash/server/declarationMapsEnableMapping_NoInline.ts
+++ b/tests/cases/fourslash/server/declarationMapsEnableMapping_NoInline.ts
@@ -4,6 +4,7 @@
////{
//// "compilerOptions": {
//// "module": "commonjs",
+//// "target": "es2015",
//// "lib": ["es5"],
//// "strict": false,
//// "outDir": "./dist",
@@ -41,20 +42,17 @@
////"use strict";
////Object.defineProperty(exports, "__esModule", { value: true });
////exports.Foo = void 0;
-////var Foo = /** @class */ (function () {
-//// function Foo() {
-//// }
-//// Foo.prototype.methodName = function (propName) { return propName; };
-//// Foo.prototype.otherMethod = function () {
+////class Foo {
+//// methodName(propName) { return propName; }
+//// otherMethod() {
//// if (Math.random() > 0.5) {
//// return { x: 42 };
//// }
//// return { y: "yes" };
-//// };
-//// return Foo;
-////}());
+//// }
+////}
////exports.Foo = Foo;
-//////# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTtJQUFBO0lBU0EsQ0FBQztJQVBHLHdCQUFVLEdBQVYsVUFBVyxRQUFrQixJQUFjLE9BQU8sUUFBUSxDQUFDLENBQUMsQ0FBQztJQUM3RCx5QkFBVyxHQUFYO1FBQ0ksSUFBSSxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsR0FBRyxFQUFFLENBQUM7WUFDdEIsT0FBTyxFQUFDLENBQUMsRUFBRSxFQUFFLEVBQUMsQ0FBQztRQUNuQixDQUFDO1FBQ0QsT0FBTyxFQUFDLENBQUMsRUFBRSxLQUFLLEVBQUMsQ0FBQztJQUN0QixDQUFDO0lBQ0wsVUFBQztBQUFELENBQUMsQUFURCxJQVNDO0FBVFksa0JBQUcifQ==
+//////# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxNQUFhLEdBQUc7SUFFWixVQUFVLENBQUMsUUFBa0IsSUFBYyxPQUFPLFFBQVEsQ0FBQyxDQUFDLENBQUM7SUFDN0QsV0FBVztRQUNQLElBQUksSUFBSSxDQUFDLE1BQU0sRUFBRSxHQUFHLEdBQUcsRUFBRSxDQUFDO1lBQ3RCLE9BQU8sRUFBQyxDQUFDLEVBQUUsRUFBRSxFQUFDLENBQUM7UUFDbkIsQ0FBQztRQUNELE9BQU8sRUFBQyxDQUFDLEVBQUUsS0FBSyxFQUFDLENBQUM7SUFDdEIsQ0FBQztDQUNKO0FBVEQsa0JBU0MifQ==
// @Filename: /home/src/workspaces/project/dist/index.d.ts.map
////{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,qBAAa,GAAG;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ;IACxC,WAAW;;;;;;;CAMd;AAED,MAAM,WAAW,QAAQ;IACrB,MAAM,EAAE,MAAM,CAAC;CAClB"}
diff --git a/tests/cases/fourslash/server/declarationMapsEnableMapping_NoInlineSources.ts b/tests/cases/fourslash/server/declarationMapsEnableMapping_NoInlineSources.ts
index cdceb8d471b33..f8b2cdfe32b71 100644
--- a/tests/cases/fourslash/server/declarationMapsEnableMapping_NoInlineSources.ts
+++ b/tests/cases/fourslash/server/declarationMapsEnableMapping_NoInlineSources.ts
@@ -4,6 +4,7 @@
////{
//// "compilerOptions": {
//// "module": "commonjs",
+//// "target": "es2015",
//// "lib": ["es5"],
//// "strict": false,
//// "outDir": "./dist",
@@ -42,20 +43,17 @@
////"use strict";
////Object.defineProperty(exports, "__esModule", { value: true });
////exports.Foo = void 0;
-////var Foo = /** @class */ (function () {
-//// function Foo() {
-//// }
-//// Foo.prototype.methodName = function (propName) { return propName; };
-//// Foo.prototype.otherMethod = function () {
+////class Foo {
+//// methodName(propName) { return propName; }
+//// otherMethod() {
//// if (Math.random() > 0.5) {
//// return { x: 42 };
//// }
//// return { y: "yes" };
-//// };
-//// return Foo;
-////}());
+//// }
+////}
////exports.Foo = Foo;
-//////# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTtJQUFBO0lBU0EsQ0FBQztJQVBHLHdCQUFVLEdBQVYsVUFBVyxRQUFrQixJQUFjLE9BQU8sUUFBUSxDQUFDLENBQUMsQ0FBQztJQUM3RCx5QkFBVyxHQUFYO1FBQ0ksSUFBSSxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsR0FBRyxFQUFFLENBQUM7WUFDdEIsT0FBTyxFQUFDLENBQUMsRUFBRSxFQUFFLEVBQUMsQ0FBQztRQUNuQixDQUFDO1FBQ0QsT0FBTyxFQUFDLENBQUMsRUFBRSxLQUFLLEVBQUMsQ0FBQztJQUN0QixDQUFDO0lBQ0wsVUFBQztBQUFELENBQUMsQUFURCxJQVNDO0FBVFksa0JBQUciLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY2xhc3MgRm9vIHtcbiAgICBtZW1iZXI6IHN0cmluZztcbiAgICBtZXRob2ROYW1lKHByb3BOYW1lOiBTb21lVHlwZSk6IFNvbWVUeXBlIHsgcmV0dXJuIHByb3BOYW1lOyB9XG4gICAgb3RoZXJNZXRob2QoKSB7XG4gICAgICAgIGlmIChNYXRoLnJhbmRvbSgpID4gMC41KSB7XG4gICAgICAgICAgICByZXR1cm4ge3g6IDQyfTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4ge3k6IFwieWVzXCJ9O1xuICAgIH1cbn1cblxuZXhwb3J0IGludGVyZmFjZSBTb21lVHlwZSB7XG4gICAgbWVtYmVyOiBudW1iZXI7XG59Il19
+//////# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxNQUFhLEdBQUc7SUFFWixVQUFVLENBQUMsUUFBa0IsSUFBYyxPQUFPLFFBQVEsQ0FBQyxDQUFDLENBQUM7SUFDN0QsV0FBVztRQUNQLElBQUksSUFBSSxDQUFDLE1BQU0sRUFBRSxHQUFHLEdBQUcsRUFBRSxDQUFDO1lBQ3RCLE9BQU8sRUFBQyxDQUFDLEVBQUUsRUFBRSxFQUFDLENBQUM7UUFDbkIsQ0FBQztRQUNELE9BQU8sRUFBQyxDQUFDLEVBQUUsS0FBSyxFQUFDLENBQUM7SUFDdEIsQ0FBQztDQUNKO0FBVEQsa0JBU0MiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY2xhc3MgRm9vIHtcbiAgICBtZW1iZXI6IHN0cmluZztcbiAgICBtZXRob2ROYW1lKHByb3BOYW1lOiBTb21lVHlwZSk6IFNvbWVUeXBlIHsgcmV0dXJuIHByb3BOYW1lOyB9XG4gICAgb3RoZXJNZXRob2QoKSB7XG4gICAgICAgIGlmIChNYXRoLnJhbmRvbSgpID4gMC41KSB7XG4gICAgICAgICAgICByZXR1cm4ge3g6IDQyfTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4ge3k6IFwieWVzXCJ9O1xuICAgIH1cbn1cblxuZXhwb3J0IGludGVyZmFjZSBTb21lVHlwZSB7XG4gICAgbWVtYmVyOiBudW1iZXI7XG59Il19
// @Filename: /home/src/workspaces/project/dist/index.d.ts.map
////{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,qBAAa,GAAG;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ;IACxC,WAAW;;;;;;;CAMd;AAED,MAAM,WAAW,QAAQ;IACrB,MAAM,EAAE,MAAM,CAAC;CAClB"}
diff --git a/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping.ts b/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping.ts
index c4ee3c01124de..ee4ba35822bc3 100644
--- a/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping.ts
+++ b/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping.ts
@@ -4,6 +4,7 @@
////{
//// "compilerOptions": {
//// "module": "commonjs",
+//// "target": "es2015",
//// "lib": ["es5"],
//// "strict": false,
//// "outDir": "./dist",
@@ -40,18 +41,15 @@
////"use strict";
////Object.defineProperty(exports, "__esModule", { value: true });
////exports.Foo = void 0;
-////var Foo = /** @class */ (function () {
-//// function Foo() {
-//// }
-//// Foo.prototype.methodName = function (propName) { return propName; };
-//// Foo.prototype.otherMethod = function () {
+////class Foo {
+//// methodName(propName) { return propName; }
+//// otherMethod() {
//// if (Math.random() > 0.5) {
//// return { x: 42 };
//// }
//// return { y: "yes" };
-//// };
-//// return Foo;
-////}());
+//// }
+////}
////exports.Foo = Foo;
////
diff --git a/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping2.ts b/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping2.ts
index 10f0938ca3600..8fa5bff108bfa 100644
--- a/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping2.ts
+++ b/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping2.ts
@@ -4,6 +4,7 @@
////{
//// "compilerOptions": {
//// "module": "commonjs",
+//// "target": "es2015",
//// "lib": ["es5"],
//// "strict": false,
//// "outDir": "./dist",
@@ -39,24 +40,21 @@
////instance.[|/*1*/methodName|]({member: 12});
// @Filename: /home/src/workspaces/project/dist/index.js.map
-////{"version":3,"file":"index.js","sourceRoot":"/home/src/workspaces/project/","sources":["index.ts"],"names":[],"mappings":";;;AAAA;IAAA;IASA,CAAC;IAPG,wBAAU,GAAV,UAAW,QAAkB,IAAc,OAAO,QAAQ,CAAC,CAAC,CAAC;IAC7D,yBAAW,GAAX;QACI,IAAI,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,EAAE,CAAC;YACtB,OAAO,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC;QACnB,CAAC;QACD,OAAO,EAAC,CAAC,EAAE,KAAK,EAAC,CAAC;IACtB,CAAC;IACL,UAAC;AAAD,CAAC,AATD,IASC;AATY,kBAAG"}
+////{"version":3,"file":"index.js","sourceRoot":"/home/src/workspaces/project/","sources":["index.ts"],"names":[],"mappings":";;;AAAA,MAAa,GAAG;IAEZ,UAAU,CAAC,QAAkB,IAAc,OAAO,QAAQ,CAAC,CAAC,CAAC;IAC7D,WAAW;QACP,IAAI,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,EAAE,CAAC;YACtB,OAAO,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC;QACnB,CAAC;QACD,OAAO,EAAC,CAAC,EAAE,KAAK,EAAC,CAAC;IACtB,CAAC;CACJ;AATD,kBASC"}
// @Filename: /home/src/workspaces/project/dist/index.js
////"use strict";
////Object.defineProperty(exports, "__esModule", { value: true });
////exports.Foo = void 0;
-////var Foo = /** @class */ (function () {
-//// function Foo() {
-//// }
-//// Foo.prototype.methodName = function (propName) { return propName; };
-//// Foo.prototype.otherMethod = function () {
+////class Foo {
+//// methodName(propName) { return propName; }
+//// otherMethod() {
//// if (Math.random() > 0.5) {
//// return { x: 42 };
//// }
//// return { y: "yes" };
-//// };
-//// return Foo;
-////}());
+//// }
+////}
////exports.Foo = Foo;
//////# sourceMappingURL=index.js.map
diff --git a/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping3.ts b/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping3.ts
index bd91282f94c79..2ea5322ebd2e7 100644
--- a/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping3.ts
+++ b/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping3.ts
@@ -4,6 +4,7 @@
////{
//// "compilerOptions": {
//// "module": "commonjs",
+//// "target": "es2015",
//// "lib": ["es5"],
//// "strict": false,
//// "outDir": "./dist",
@@ -41,18 +42,15 @@
////"use strict";
////Object.defineProperty(exports, "__esModule", { value: true });
////exports.Foo = void 0;
-////var Foo = /** @class */ (function () {
-//// function Foo() {
-//// }
-//// Foo.prototype.methodName = function (propName) { return propName; };
-//// Foo.prototype.otherMethod = function () {
+////class Foo {
+//// methodName(propName) { return propName; }
+//// otherMethod() {
//// if (Math.random() > 0.5) {
//// return { x: 42 };
//// }
//// return { y: "yes" };
-//// };
-//// return Foo;
-////}());
+//// }
+////}
////exports.Foo = Foo;
////
diff --git a/tests/cases/fourslash/suggestionOfUnusedVariableWithExternalModule.ts b/tests/cases/fourslash/suggestionOfUnusedVariableWithExternalModule.ts
index 77d0b6157fde5..b66524afdd55f 100644
--- a/tests/cases/fourslash/suggestionOfUnusedVariableWithExternalModule.ts
+++ b/tests/cases/fourslash/suggestionOfUnusedVariableWithExternalModule.ts
@@ -1,6 +1,7 @@
///
//@allowJs: true
+//@module: commonjs
// @Filename: /mymodule.js
////(function ([|root|], factory) {
@@ -12,12 +13,18 @@
// @Filename: /app.js
//////@ts-check
-////require("./mymodule");
+////[|require("./mymodule")|];
-const [range0, range1] = test.ranges();
+const [range0, range1, range2] = test.ranges();
goTo.file("/app.js");
-verify.getSuggestionDiagnostics([]);
+verify.getSuggestionDiagnostics([
+ {
+ code: 80001,
+ message: "File is a CommonJS module; it may be converted to an ES module.",
+ range: range2,
+ },
+]);
goTo.file("/mymodule.js");
verify.getSuggestionDiagnostics([
From 437f55a758a40206f4e259ca6791c5936981a4ba Mon Sep 17 00:00:00 2001
From: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
Date: Thu, 29 Jan 2026 16:37:15 -0800
Subject: [PATCH 04/11] Explicitly set target for codefix tsconfig tests
---
...codeFixTopLevelAwait_target_blankCompilerOptionsInTsConfig.ts | 1 +
...deFixTopLevelAwait_target_missingCompilerOptionsInTsConfig.ts | 1 +
...eFixTopLevelForAwait_target_blankCompilerOptionsInTsConfig.ts | 1 +
...ixTopLevelForAwait_target_missingCompilerOptionsInTsConfig.ts | 1 +
4 files changed, 4 insertions(+)
diff --git a/tests/cases/fourslash/codeFixTopLevelAwait_target_blankCompilerOptionsInTsConfig.ts b/tests/cases/fourslash/codeFixTopLevelAwait_target_blankCompilerOptionsInTsConfig.ts
index dc046ceda2336..b7fc558293787 100644
--- a/tests/cases/fourslash/codeFixTopLevelAwait_target_blankCompilerOptionsInTsConfig.ts
+++ b/tests/cases/fourslash/codeFixTopLevelAwait_target_blankCompilerOptionsInTsConfig.ts
@@ -6,6 +6,7 @@
// @filename: /dir/tsconfig.json
////{
//// "compilerOptions": {
+//// "target": "es2015",
//// "module": "commonjs"
//// }
////}
diff --git a/tests/cases/fourslash/codeFixTopLevelAwait_target_missingCompilerOptionsInTsConfig.ts b/tests/cases/fourslash/codeFixTopLevelAwait_target_missingCompilerOptionsInTsConfig.ts
index dc046ceda2336..b7fc558293787 100644
--- a/tests/cases/fourslash/codeFixTopLevelAwait_target_missingCompilerOptionsInTsConfig.ts
+++ b/tests/cases/fourslash/codeFixTopLevelAwait_target_missingCompilerOptionsInTsConfig.ts
@@ -6,6 +6,7 @@
// @filename: /dir/tsconfig.json
////{
//// "compilerOptions": {
+//// "target": "es2015",
//// "module": "commonjs"
//// }
////}
diff --git a/tests/cases/fourslash/codeFixTopLevelForAwait_target_blankCompilerOptionsInTsConfig.ts b/tests/cases/fourslash/codeFixTopLevelForAwait_target_blankCompilerOptionsInTsConfig.ts
index 5eb72964542ed..6fe1602a6bd5c 100644
--- a/tests/cases/fourslash/codeFixTopLevelForAwait_target_blankCompilerOptionsInTsConfig.ts
+++ b/tests/cases/fourslash/codeFixTopLevelForAwait_target_blankCompilerOptionsInTsConfig.ts
@@ -7,6 +7,7 @@
// @filename: /dir/tsconfig.json
////{
//// "compilerOptions": {
+//// "target": "es2015",
//// "module": "commonjs"
//// }
////}
diff --git a/tests/cases/fourslash/codeFixTopLevelForAwait_target_missingCompilerOptionsInTsConfig.ts b/tests/cases/fourslash/codeFixTopLevelForAwait_target_missingCompilerOptionsInTsConfig.ts
index 5eb72964542ed..6fe1602a6bd5c 100644
--- a/tests/cases/fourslash/codeFixTopLevelForAwait_target_missingCompilerOptionsInTsConfig.ts
+++ b/tests/cases/fourslash/codeFixTopLevelForAwait_target_missingCompilerOptionsInTsConfig.ts
@@ -7,6 +7,7 @@
// @filename: /dir/tsconfig.json
////{
//// "compilerOptions": {
+//// "target": "es2015",
//// "module": "commonjs"
//// }
////}
From 3136fd96ac437a583e77244b9d69105d601b6226 Mon Sep 17 00:00:00 2001
From: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
Date: Thu, 29 Jan 2026 18:38:52 -0800
Subject: [PATCH 05/11] Silence deprecations in transpile and evalulator unit
tests
---
src/harness/evaluatorImpl.ts | 1 +
src/testRunner/unittests/services/transpile.ts | 2 ++
.../transpile/Generates module output.errors.txt | 6 ------
.../Generates module output.oldTranspile.errors.txt | 6 ------
.../transpile/Rename dependencies - AMD.errors.txt | 8 --------
.../transpile/Rename dependencies - System.errors.txt | 8 --------
.../transpile/Rename dependencies - UMD.errors.txt | 8 --------
.../reference/transpile/Sets module name.errors.txt | 6 ------
.../transpile/Sets module name.oldTranspile.errors.txt | 6 ------
...setting baseUrl (verbatimModuleSyntax=true).errors.txt | 8 --------
...rl (verbatimModuleSyntax=true).oldTranspile.errors.txt | 8 --------
.../transpile/Supports setting baseUrl.errors.txt | 8 --------
.../Supports setting baseUrl.oldTranspile.errors.txt | 8 --------
...oduleResolution (verbatimModuleSyntax=true).errors.txt | 8 --------
...on (verbatimModuleSyntax=true).oldTranspile.errors.txt | 8 --------
.../Supports setting moduleResolution.errors.txt | 8 --------
...ports setting moduleResolution.oldTranspile.errors.txt | 8 --------
17 files changed, 3 insertions(+), 112 deletions(-)
delete mode 100644 tests/baselines/reference/transpile/Generates module output.errors.txt
delete mode 100644 tests/baselines/reference/transpile/Generates module output.oldTranspile.errors.txt
delete mode 100644 tests/baselines/reference/transpile/Rename dependencies - AMD.errors.txt
delete mode 100644 tests/baselines/reference/transpile/Rename dependencies - System.errors.txt
delete mode 100644 tests/baselines/reference/transpile/Rename dependencies - UMD.errors.txt
delete mode 100644 tests/baselines/reference/transpile/Sets module name.errors.txt
delete mode 100644 tests/baselines/reference/transpile/Sets module name.oldTranspile.errors.txt
delete mode 100644 tests/baselines/reference/transpile/Supports setting baseUrl (verbatimModuleSyntax=true).errors.txt
delete mode 100644 tests/baselines/reference/transpile/Supports setting baseUrl (verbatimModuleSyntax=true).oldTranspile.errors.txt
delete mode 100644 tests/baselines/reference/transpile/Supports setting baseUrl.errors.txt
delete mode 100644 tests/baselines/reference/transpile/Supports setting baseUrl.oldTranspile.errors.txt
delete mode 100644 tests/baselines/reference/transpile/Supports setting moduleResolution (verbatimModuleSyntax=true).errors.txt
delete mode 100644 tests/baselines/reference/transpile/Supports setting moduleResolution (verbatimModuleSyntax=true).oldTranspile.errors.txt
delete mode 100644 tests/baselines/reference/transpile/Supports setting moduleResolution.errors.txt
delete mode 100644 tests/baselines/reference/transpile/Supports setting moduleResolution.oldTranspile.errors.txt
diff --git a/src/harness/evaluatorImpl.ts b/src/harness/evaluatorImpl.ts
index 7b434403eb15c..664947bf612b0 100644
--- a/src/harness/evaluatorImpl.ts
+++ b/src/harness/evaluatorImpl.ts
@@ -41,6 +41,7 @@ export function evaluateTypeScript(source: string | { files: vfs.FileSet; rootFi
module: ts.ModuleKind.CommonJS,
strict: false,
lib: ["lib.esnext.d.ts", "lib.dom.d.ts"],
+ ignoreDeprecations: "6.0",
...options,
};
const host = new fakes.CompilerHost(fs, compilerOptions);
diff --git a/src/testRunner/unittests/services/transpile.ts b/src/testRunner/unittests/services/transpile.ts
index 66faf0e452a65..ea273f4e93a4e 100644
--- a/src/testRunner/unittests/services/transpile.ts
+++ b/src/testRunner/unittests/services/transpile.ts
@@ -21,6 +21,7 @@ describe("unittests:: services:: Transpile", () => {
}
if (transpileOptions.compilerOptions.target === undefined) {
transpileOptions.compilerOptions.target = ts.ScriptTarget.ES5;
+ transpileOptions.compilerOptions.ignoreDeprecations = "6.0";
}
if (transpileOptions.compilerOptions.newLine === undefined) {
@@ -204,6 +205,7 @@ var x = 0;`,
emitDecoratorMetadata: true,
experimentalDecorators: true,
target: ts.ScriptTarget.ES5,
+ ignoreDeprecations: "6.0",
},
},
testVerbatimModuleSyntax: true,
diff --git a/tests/baselines/reference/transpile/Generates module output.errors.txt b/tests/baselines/reference/transpile/Generates module output.errors.txt
deleted file mode 100644
index b37ebfefd282d..0000000000000
--- a/tests/baselines/reference/transpile/Generates module output.errors.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-
-
-!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-==== file.ts (0 errors) ====
- var x = 0; export {};
\ No newline at end of file
diff --git a/tests/baselines/reference/transpile/Generates module output.oldTranspile.errors.txt b/tests/baselines/reference/transpile/Generates module output.oldTranspile.errors.txt
deleted file mode 100644
index b37ebfefd282d..0000000000000
--- a/tests/baselines/reference/transpile/Generates module output.oldTranspile.errors.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-
-
-!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-==== file.ts (0 errors) ====
- var x = 0; export {};
\ No newline at end of file
diff --git a/tests/baselines/reference/transpile/Rename dependencies - AMD.errors.txt b/tests/baselines/reference/transpile/Rename dependencies - AMD.errors.txt
deleted file mode 100644
index 8d9b3dec5bd51..0000000000000
--- a/tests/baselines/reference/transpile/Rename dependencies - AMD.errors.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-
-
-!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-==== file.ts (0 errors) ====
- import {foo} from "SomeName";
- declare function use(a: any);
- use(foo);
\ No newline at end of file
diff --git a/tests/baselines/reference/transpile/Rename dependencies - System.errors.txt b/tests/baselines/reference/transpile/Rename dependencies - System.errors.txt
deleted file mode 100644
index d44d2a643ba0a..0000000000000
--- a/tests/baselines/reference/transpile/Rename dependencies - System.errors.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-error TS5107: Option 'module=System' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-
-
-!!! error TS5107: Option 'module=System' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-==== file.ts (0 errors) ====
- import {foo} from "SomeName";
- declare function use(a: any);
- use(foo);
\ No newline at end of file
diff --git a/tests/baselines/reference/transpile/Rename dependencies - UMD.errors.txt b/tests/baselines/reference/transpile/Rename dependencies - UMD.errors.txt
deleted file mode 100644
index c516802c09bd7..0000000000000
--- a/tests/baselines/reference/transpile/Rename dependencies - UMD.errors.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-error TS5107: Option 'module=UMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-
-
-!!! error TS5107: Option 'module=UMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-==== file.ts (0 errors) ====
- import {foo} from "SomeName";
- declare function use(a: any);
- use(foo);
\ No newline at end of file
diff --git a/tests/baselines/reference/transpile/Sets module name.errors.txt b/tests/baselines/reference/transpile/Sets module name.errors.txt
deleted file mode 100644
index 28fdb1e333a68..0000000000000
--- a/tests/baselines/reference/transpile/Sets module name.errors.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-error TS5107: Option 'module=System' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-
-
-!!! error TS5107: Option 'module=System' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-==== file.ts (0 errors) ====
- var x = 1; export {};
\ No newline at end of file
diff --git a/tests/baselines/reference/transpile/Sets module name.oldTranspile.errors.txt b/tests/baselines/reference/transpile/Sets module name.oldTranspile.errors.txt
deleted file mode 100644
index 28fdb1e333a68..0000000000000
--- a/tests/baselines/reference/transpile/Sets module name.oldTranspile.errors.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-error TS5107: Option 'module=System' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-
-
-!!! error TS5107: Option 'module=System' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-==== file.ts (0 errors) ====
- var x = 1; export {};
\ No newline at end of file
diff --git a/tests/baselines/reference/transpile/Supports setting baseUrl (verbatimModuleSyntax=true).errors.txt b/tests/baselines/reference/transpile/Supports setting baseUrl (verbatimModuleSyntax=true).errors.txt
deleted file mode 100644
index 886c2ab8d3090..0000000000000
--- a/tests/baselines/reference/transpile/Supports setting baseUrl (verbatimModuleSyntax=true).errors.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
- Visit https://aka.ms/ts6 for migration information.
-
-
-!!! error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-!!! error TS5101: Visit https://aka.ms/ts6 for migration information.
-==== input.js (0 errors) ====
- x;
\ No newline at end of file
diff --git a/tests/baselines/reference/transpile/Supports setting baseUrl (verbatimModuleSyntax=true).oldTranspile.errors.txt b/tests/baselines/reference/transpile/Supports setting baseUrl (verbatimModuleSyntax=true).oldTranspile.errors.txt
deleted file mode 100644
index 886c2ab8d3090..0000000000000
--- a/tests/baselines/reference/transpile/Supports setting baseUrl (verbatimModuleSyntax=true).oldTranspile.errors.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
- Visit https://aka.ms/ts6 for migration information.
-
-
-!!! error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-!!! error TS5101: Visit https://aka.ms/ts6 for migration information.
-==== input.js (0 errors) ====
- x;
\ No newline at end of file
diff --git a/tests/baselines/reference/transpile/Supports setting baseUrl.errors.txt b/tests/baselines/reference/transpile/Supports setting baseUrl.errors.txt
deleted file mode 100644
index 886c2ab8d3090..0000000000000
--- a/tests/baselines/reference/transpile/Supports setting baseUrl.errors.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
- Visit https://aka.ms/ts6 for migration information.
-
-
-!!! error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-!!! error TS5101: Visit https://aka.ms/ts6 for migration information.
-==== input.js (0 errors) ====
- x;
\ No newline at end of file
diff --git a/tests/baselines/reference/transpile/Supports setting baseUrl.oldTranspile.errors.txt b/tests/baselines/reference/transpile/Supports setting baseUrl.oldTranspile.errors.txt
deleted file mode 100644
index 886c2ab8d3090..0000000000000
--- a/tests/baselines/reference/transpile/Supports setting baseUrl.oldTranspile.errors.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
- Visit https://aka.ms/ts6 for migration information.
-
-
-!!! error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-!!! error TS5101: Visit https://aka.ms/ts6 for migration information.
-==== input.js (0 errors) ====
- x;
\ No newline at end of file
diff --git a/tests/baselines/reference/transpile/Supports setting moduleResolution (verbatimModuleSyntax=true).errors.txt b/tests/baselines/reference/transpile/Supports setting moduleResolution (verbatimModuleSyntax=true).errors.txt
deleted file mode 100644
index 1f034149e4db0..0000000000000
--- a/tests/baselines/reference/transpile/Supports setting moduleResolution (verbatimModuleSyntax=true).errors.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
- Visit https://aka.ms/ts6 for migration information.
-
-
-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-!!! error TS5107: Visit https://aka.ms/ts6 for migration information.
-==== input.js (0 errors) ====
- x;
\ No newline at end of file
diff --git a/tests/baselines/reference/transpile/Supports setting moduleResolution (verbatimModuleSyntax=true).oldTranspile.errors.txt b/tests/baselines/reference/transpile/Supports setting moduleResolution (verbatimModuleSyntax=true).oldTranspile.errors.txt
deleted file mode 100644
index 1f034149e4db0..0000000000000
--- a/tests/baselines/reference/transpile/Supports setting moduleResolution (verbatimModuleSyntax=true).oldTranspile.errors.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
- Visit https://aka.ms/ts6 for migration information.
-
-
-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-!!! error TS5107: Visit https://aka.ms/ts6 for migration information.
-==== input.js (0 errors) ====
- x;
\ No newline at end of file
diff --git a/tests/baselines/reference/transpile/Supports setting moduleResolution.errors.txt b/tests/baselines/reference/transpile/Supports setting moduleResolution.errors.txt
deleted file mode 100644
index 1f034149e4db0..0000000000000
--- a/tests/baselines/reference/transpile/Supports setting moduleResolution.errors.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
- Visit https://aka.ms/ts6 for migration information.
-
-
-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-!!! error TS5107: Visit https://aka.ms/ts6 for migration information.
-==== input.js (0 errors) ====
- x;
\ No newline at end of file
diff --git a/tests/baselines/reference/transpile/Supports setting moduleResolution.oldTranspile.errors.txt b/tests/baselines/reference/transpile/Supports setting moduleResolution.oldTranspile.errors.txt
deleted file mode 100644
index 1f034149e4db0..0000000000000
--- a/tests/baselines/reference/transpile/Supports setting moduleResolution.oldTranspile.errors.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
- Visit https://aka.ms/ts6 for migration information.
-
-
-!!! error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
-!!! error TS5107: Visit https://aka.ms/ts6 for migration information.
-==== input.js (0 errors) ====
- x;
\ No newline at end of file
From 67cf1148e5e63705e1a5d2314526e40078c54dba Mon Sep 17 00:00:00 2001
From: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
Date: Thu, 29 Jan 2026 19:25:47 -0800
Subject: [PATCH 06/11] Update other unit tests to prevent deprecation errors
---
src/testRunner/unittests/helpers/contents.ts | 2 +-
.../helpers/demoProjectReferences.ts | 2 +-
.../unittests/tsbuild/emitDeclarationOnly.ts | 2 +-
.../inferredTypeFromTransitiveModule.ts | 2 +-
.../unittests/tsbuild/resolveJsonModule.ts | 2 +-
src/testRunner/unittests/tsbuild/sample.ts | 14 +-
src/testRunner/unittests/tsc/composite.ts | 8 +-
.../unittests/tsc/declarationEmit.ts | 4 +-
src/testRunner/unittests/tsc/incremental.ts | 2 +-
.../unittests/tscWatch/incremental.ts | 2 +-
.../unittests/tscWatch/programUpdates.ts | 4 +-
...s-not-in-rootDir-at-the-import-location.js | 48 +--
...ts-the-error-about-it-by-stopping-build.js | 2 +-
...ng-setup-correctly-and-reports-no-error.js | 42 +--
...-emitDeclarationOnly-and-declarationMap.js | 24 +-
...import-project-with-emitDeclarationOnly.js | 24 +-
...mports-project-with-emitDeclarationOnly.js | 34 ++-
...-transitive-module-with-isolatedModules.js | 194 +++++++------
.../inferred-type-from-transitive-module.js | 194 +++++++------
...hange-in-signature-with-isolatedModules.js | 273 ++++++++++--------
...ting-json-module-from-project-reference.js | 34 ++-
...uilds-when-extended-config-file-changes.js | 104 ++++---
.../sample1/when-target-option-changes.js | 68 ++---
.../demo/updates-with-bad-reference.js | 86 +++---
.../demo/updates-with-circular-reference.js | 66 +++--
...and-line-but-has-tsbuild-info-in-config.js | 4 +-
...and-line-but-has-tsbuild-info-in-config.js | 4 +-
...setting-composite-false-on-command-line.js | 4 +-
...-setting-composite-null-on-command-line.js | 4 +-
...rough-indirect-symlink-moduleCaseChange.js | 10 +-
...ibling-package-through-indirect-symlink.js | 10 +-
...ther-symlinked-package-moduleCaseChange.js | 28 +-
...age-with-indirect-link-moduleCaseChange.js | 25 +-
...er-symlinked-package-with-indirect-link.js | 25 +-
...gh-source-and-another-symlinked-package.js | 28 +-
...g-filename-for-buildinfo-on-commandline.js | 22 +-
...al-with-circular-references-incremental.js | 36 +--
...remental-with-circular-references-watch.js | 42 +--
...s-changes-in-lib-section-of-config-file.js | 8 +-
.../on-sample-project-with-nodenext.js | 158 +++++-----
.../on-transitive-references-with-nodenext.js | 209 +++++++-------
...-project-when-solution-is-already-built.js | 46 +--
.../with-simple-project.js | 30 +-
43 files changed, 1017 insertions(+), 913 deletions(-)
diff --git a/src/testRunner/unittests/helpers/contents.ts b/src/testRunner/unittests/helpers/contents.ts
index ddfd14d5695a4..668c64a0a0a87 100644
--- a/src/testRunner/unittests/helpers/contents.ts
+++ b/src/testRunner/unittests/helpers/contents.ts
@@ -32,5 +32,5 @@ interface Symbol {
`;
export function getProjectConfigWithNodeNext(withNodeNext: boolean | undefined): object | undefined {
- return withNodeNext ? { module: "nodenext", target: "es5" } : undefined;
+ return withNodeNext ? { module: "nodenext", target: "es2015" } : undefined;
}
diff --git a/src/testRunner/unittests/helpers/demoProjectReferences.ts b/src/testRunner/unittests/helpers/demoProjectReferences.ts
index 38e7360f704c4..580445c6627b2 100644
--- a/src/testRunner/unittests/helpers/demoProjectReferences.ts
+++ b/src/testRunner/unittests/helpers/demoProjectReferences.ts
@@ -92,7 +92,7 @@ export function getSysForDemoProjectReferences(): TestServerHost {
"/user/username/projects/demo/tsconfig-base.json": jsonToReadableText({
compilerOptions: {
declaration: true,
- target: "es5",
+ target: "es2015",
module: "commonjs",
strict: true,
noUnusedLocals: true,
diff --git a/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts b/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts
index 14761b6ac72c3..7fd8b1fca4c34 100644
--- a/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts
+++ b/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts
@@ -35,7 +35,7 @@ describe("unittests:: tsbuild:: on project with emitDeclarationOnly:: set to tru
"/home/src/workspaces/project/tsconfig.json": jsonToReadableText({
compilerOptions: {
incremental: true,
- target: "es5",
+ target: "es2015",
module: "commonjs",
declaration: true,
declarationMap: true,
diff --git a/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts b/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts
index 0690fea37c0fd..5cb44ee4b92e2 100644
--- a/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts
+++ b/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts
@@ -50,7 +50,7 @@ describe("unittests:: tsbuild:: inferredTypeFromTransitiveModule::", () => {
`,
"/home/src/workspaces/project/tsconfig.json": jsonToReadableText({
compilerOptions: {
- target: "es5",
+ target: "es2015",
declaration: true,
outDir: "obj",
incremental: true,
diff --git a/src/testRunner/unittests/tsbuild/resolveJsonModule.ts b/src/testRunner/unittests/tsbuild/resolveJsonModule.ts
index fec8ba82f042d..b053e420b0db5 100644
--- a/src/testRunner/unittests/tsbuild/resolveJsonModule.ts
+++ b/src/testRunner/unittests/tsbuild/resolveJsonModule.ts
@@ -178,7 +178,7 @@ describe("unittests:: tsbuild:: with resolveJsonModule:: option on project impor
}),
"/home/src/workspaces/solution/project/tsconfig.json": jsonToReadableText({
compilerOptions: {
- target: "es5",
+ target: "es2015",
module: "commonjs",
rootDir: "./",
composite: true,
diff --git a/src/testRunner/unittests/tsbuild/sample.ts b/src/testRunner/unittests/tsbuild/sample.ts
index e4ab7334c272c..3d09c5633e3b5 100644
--- a/src/testRunner/unittests/tsbuild/sample.ts
+++ b/src/testRunner/unittests/tsbuild/sample.ts
@@ -1,5 +1,6 @@
import { Baseline } from "../../_namespaces/Harness.js";
import * as ts from "../../_namespaces/ts.js";
+import { dedent } from "../../_namespaces/Utils.js";
import { jsonToReadableText } from "../helpers.js";
import {
fakeTsVersion,
@@ -241,7 +242,7 @@ describe("unittests:: tsbuild:: on 'sample1' project", () => {
sys: getSysForSampleProjectReferences,
commandLineArgs: ["--b", "tests", "--verbose"],
modifySystem: sys => {
- sys.writeFile("tests/tsconfig.base.json", jsonToReadableText({ compilerOptions: { target: "es5" } }));
+ sys.writeFile("tests/tsconfig.base.json", jsonToReadableText({ compilerOptions: { target: "es2015" } }));
sys.replaceFileText("tests/tsconfig.json", `"references": [`, `"extends": "./tsconfig.base.json", "references": [`);
},
edits: [{
@@ -510,6 +511,15 @@ class someClass2 { }`,
libFile.path,
`/// `,
);
+ sys.writeFile(
+ "core/index.ts",
+ dedent`
+ export const someString: string = "HELLO WORLD";
+ export function leftPad(s: string, n: number) { return s + n; }
+ export function multiply(a: number, b: number) { return a * b; }
+ export function exponentiate(a: number, b: number) { return a ** b; }
+ `,
+ );
sys.writeFile(
"core/tsconfig.json",
jsonToReadableText({
@@ -524,7 +534,7 @@ class someClass2 { }`,
},
edits: [{
caption: "incremental-declaration-changes",
- edit: sys => sys.replaceFileText("core/tsconfig.json", "esnext", "es5"),
+ edit: sys => sys.replaceFileText("core/tsconfig.json", "esnext", "es2015"),
}],
});
diff --git a/src/testRunner/unittests/tsc/composite.ts b/src/testRunner/unittests/tsc/composite.ts
index 518ad7290b00e..05d764fae2b15 100644
--- a/src/testRunner/unittests/tsc/composite.ts
+++ b/src/testRunner/unittests/tsc/composite.ts
@@ -13,7 +13,7 @@ describe("unittests:: tsc:: composite::", () => {
"/home/src/workspaces/project/src/main.ts": "export const x = 10;",
"/home/src/workspaces/project/tsconfig.json": jsonToReadableText({
compilerOptions: {
- target: "es5",
+ target: "es2015",
module: "commonjs",
composite: true,
},
@@ -33,7 +33,7 @@ describe("unittests:: tsc:: composite::", () => {
"/home/src/workspaces/project/src/main.ts": "export const x = 10;",
"/home/src/workspaces/project/tsconfig.json": jsonToReadableText({
compilerOptions: {
- target: "es5",
+ target: "es2015",
module: "commonjs",
composite: true,
},
@@ -53,7 +53,7 @@ describe("unittests:: tsc:: composite::", () => {
"/home/src/workspaces/project/src/main.ts": "export const x = 10;",
"/home/src/workspaces/project/tsconfig.json": jsonToReadableText({
compilerOptions: {
- target: "es5",
+ target: "es2015",
module: "commonjs",
composite: true,
tsBuildInfoFile: "tsconfig.json.tsbuildinfo",
@@ -74,7 +74,7 @@ describe("unittests:: tsc:: composite::", () => {
"/home/src/workspaces/project/src/main.ts": "export const x = 10;",
"/home/src/workspaces/project/tsconfig.json": jsonToReadableText({
compilerOptions: {
- target: "es5",
+ target: "es2015",
module: "commonjs",
composite: true,
tsBuildInfoFile: "tsconfig.json.tsbuildinfo",
diff --git a/src/testRunner/unittests/tsc/declarationEmit.ts b/src/testRunner/unittests/tsc/declarationEmit.ts
index 83c4540c40ace..91ed1ed08073f 100644
--- a/src/testRunner/unittests/tsc/declarationEmit.ts
+++ b/src/testRunner/unittests/tsc/declarationEmit.ts
@@ -55,7 +55,7 @@ describe("unittests:: tsc:: declarationEmit::", () => {
function pluginOneConfig() {
return jsonToReadableText({
compilerOptions: {
- target: "es5",
+ target: "es2015",
declaration: true,
traceResolution: true,
},
@@ -236,7 +236,7 @@ ${pluginOneAction()}`,
compilerOptions: {
outDir: "dist",
rootDir: "src",
- target: "es5",
+ target: "es2015",
module: "commonjs",
strict: true,
esModuleInterop: true,
diff --git a/src/testRunner/unittests/tsc/incremental.ts b/src/testRunner/unittests/tsc/incremental.ts
index fcbd91ab1d296..74d2991b82991 100644
--- a/src/testRunner/unittests/tsc/incremental.ts
+++ b/src/testRunner/unittests/tsc/incremental.ts
@@ -23,7 +23,7 @@ describe("unittests:: tsc:: incremental::", () => {
"/home/src/workspaces/project/src/main.ts": "export const x = 10;",
"/home/src/workspaces/project/tsconfig.json": jsonToReadableText({
compilerOptions: {
- target: "es5",
+ target: "es2015",
module: "commonjs",
},
include: [
diff --git a/src/testRunner/unittests/tscWatch/incremental.ts b/src/testRunner/unittests/tscWatch/incremental.ts
index ab0f8795f10ab..244ab8b6c62f3 100644
--- a/src/testRunner/unittests/tscWatch/incremental.ts
+++ b/src/testRunner/unittests/tscWatch/incremental.ts
@@ -243,7 +243,7 @@ describe("unittests:: tscWatch:: incremental:: emit file --incremental", () => {
content: jsonToReadableText({
compilerOptions: {
incremental: true,
- target: "es5",
+ target: "es2015",
module: "commonjs",
declaration: true,
emitDeclarationOnly: true,
diff --git a/src/testRunner/unittests/tscWatch/programUpdates.ts b/src/testRunner/unittests/tscWatch/programUpdates.ts
index 7fab62c966987..f676472804e0c 100644
--- a/src/testRunner/unittests/tscWatch/programUpdates.ts
+++ b/src/testRunner/unittests/tscWatch/programUpdates.ts
@@ -985,7 +985,7 @@ declare const eval: any`,
{
compilerOptions: {
module: "commonjs",
- target: "es5",
+ target: "es2015",
noImplicitAny: true,
sourceMap: false,
lib: [
@@ -1010,7 +1010,7 @@ declare const eval: any`,
{
compilerOptions: {
module: "commonjs",
- target: "es5",
+ target: "es2015",
noImplicitAny: true,
sourceMap: false,
lib: [
diff --git a/tests/baselines/reference/tsbuild/demo/in-bad-ref-branch-reports-the-error-about-files-not-in-rootDir-at-the-import-location.js b/tests/baselines/reference/tsbuild/demo/in-bad-ref-branch-reports-the-error-about-files-not-in-rootDir-at-the-import-location.js
index 86d99671f6417..2636730832fe0 100644
--- a/tests/baselines/reference/tsbuild/demo/in-bad-ref-branch-reports-the-error-about-files-not-in-rootDir-at-the-import-location.js
+++ b/tests/baselines/reference/tsbuild/demo/in-bad-ref-branch-reports-the-error-about-files-not-in-rootDir-at-the-import-location.js
@@ -98,7 +98,7 @@ export function createZoo(): Array {
{
"compilerOptions": {
"declaration": true,
- "target": "es5",
+ "target": "es2015",
"module": "commonjs",
"strict": true,
"noUnusedLocals": true,
@@ -216,6 +216,8 @@ Found 7 errors.
+//// [/home/src/tslibs/TS/Lib/lib.es6.d.ts] *Lib*
+
//// [/user/username/projects/demo/animals/animal.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
@@ -232,12 +234,12 @@ export default interface Animal {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createDog = createDog;
-var utilities_1 = require("../core/utilities");
+const utilities_1 = require("../core/utilities");
function createDog() {
return ({
size: "medium",
woof: function () {
- console.log("".concat(this.name, " says \"Woof\"!"));
+ console.log(`${this.name} says "Woof"!`);
},
name: (0, utilities_1.makeRandomName)()
});
@@ -257,7 +259,7 @@ export declare function createDog(): Dog;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createDog = void 0;
-var dog_1 = require("./dog");
+const dog_1 = require("./dog");
Object.defineProperty(exports, "createDog", { enumerable: true, get: function () { return dog_1.createDog; } });
@@ -289,12 +291,12 @@ export declare function lastElementOf(arr: T[]): T | undefined;
//// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo]
-{"fileNames":["../../../../../../home/src/tslibs/ts/lib/lib.d.ts","../../animals/animal.ts","../../animals/dog.ts","../../animals/index.ts","../../core/utilities.ts"],"fileIdsList":[[4,5],[2,3],[4]],"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},"-9289341318-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n",{"version":"-18870194049-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}\n","signature":"6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n"},{"version":"-7220553464-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n","signature":"1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n"},{"version":"-22163106409-import * as A from '../animals';\nexport function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}\n","signature":"-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n"}],"root":[5],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../core","strict":true,"target":1},"referencedMap":[[3,1],[4,2],[5,3]],"semanticDiagnosticsPerFile":[[5,[{"start":0,"length":32,"messageText":"'A' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true}]]],"latestChangedDtsFile":"./utilities.d.ts","version":"FakeTSVersion"}
+{"fileNames":["../../../../../../home/src/tslibs/ts/lib/lib.es6.d.ts","../../animals/animal.ts","../../animals/dog.ts","../../animals/index.ts","../../core/utilities.ts"],"fileIdsList":[[4,5],[2,3],[4]],"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},"-9289341318-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n",{"version":"-18870194049-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}\n","signature":"6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n"},{"version":"-7220553464-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n","signature":"1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n"},{"version":"-22163106409-import * as A from '../animals';\nexport function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}\n","signature":"-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n"}],"root":[5],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../core","strict":true,"target":2},"referencedMap":[[3,1],[4,2],[5,3]],"semanticDiagnosticsPerFile":[[5,[{"start":0,"length":32,"messageText":"'A' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true}]]],"latestChangedDtsFile":"./utilities.d.ts","version":"FakeTSVersion"}
//// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
- "../../../../../../home/src/tslibs/ts/lib/lib.d.ts",
+ "../../../../../../home/src/tslibs/ts/lib/lib.es6.d.ts",
"../../animals/animal.ts",
"../../animals/dog.ts",
"../../animals/index.ts",
@@ -314,7 +316,7 @@ export declare function lastElementOf(arr: T[]): T | undefined;
]
],
"fileInfos": {
- "../../../../../../home/src/tslibs/ts/lib/lib.d.ts": {
+ "../../../../../../home/src/tslibs/ts/lib/lib.es6.d.ts": {
"original": {
"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
@@ -369,7 +371,7 @@ export declare function lastElementOf(arr: T[]): T | undefined;
"outDir": "./",
"rootDir": "../../core",
"strict": true,
- "target": 1
+ "target": 2
},
"referencedMap": {
"../../animals/dog.ts": [
@@ -401,7 +403,7 @@ export declare function lastElementOf(arr: T[]): T | undefined;
],
"latestChangedDtsFile": "./utilities.d.ts",
"version": "FakeTSVersion",
- "size": 2610
+ "size": 2614
}
//// [/user/username/projects/demo/lib/animals/animal.js]
@@ -420,7 +422,7 @@ export default interface Animal {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createDog = void 0;
-var dog_1 = require("./dog");
+const dog_1 = require("./dog");
Object.defineProperty(exports, "createDog", { enumerable: true, get: function () { return dog_1.createDog; } });
@@ -435,12 +437,12 @@ export { createDog, Dog };
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createDog = createDog;
-var utilities_1 = require("../core/utilities");
+const utilities_1 = require("../core/utilities");
function createDog() {
return ({
size: "medium",
woof: function () {
- console.log("".concat(this.name, " says \"Woof\"!"));
+ console.log(`${this.name} says "Woof"!`);
},
name: (0, utilities_1.makeRandomName)()
});
@@ -457,12 +459,12 @@ export declare function createDog(): Dog;
//// [/user/username/projects/demo/lib/animals/tsconfig.tsbuildinfo]
-{"fileNames":["../../../../../../home/src/tslibs/ts/lib/lib.d.ts","../../animals/animal.ts","../../animals/index.ts","../core/utilities.d.ts","../../animals/dog.ts"],"fileIdsList":[[3,4],[2,5]],"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},"-9289341318-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n",{"version":"-7220553464-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n","signature":"1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n"},"-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n",{"version":"-18870194049-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}\n","signature":"6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n"}],"root":[2,3,5],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../animals","strict":true,"target":1},"referencedMap":[[5,1],[3,2]],"latestChangedDtsFile":"./dog.d.ts","version":"FakeTSVersion"}
+{"fileNames":["../../../../../../home/src/tslibs/ts/lib/lib.es6.d.ts","../../animals/animal.ts","../../animals/index.ts","../core/utilities.d.ts","../../animals/dog.ts"],"fileIdsList":[[3,4],[2,5]],"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},"-9289341318-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n",{"version":"-7220553464-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n","signature":"1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n"},"-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n",{"version":"-18870194049-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}\n","signature":"6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n"}],"root":[2,3,5],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../animals","strict":true,"target":2},"referencedMap":[[5,1],[3,2]],"latestChangedDtsFile":"./dog.d.ts","version":"FakeTSVersion"}
//// [/user/username/projects/demo/lib/animals/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
- "../../../../../../home/src/tslibs/ts/lib/lib.d.ts",
+ "../../../../../../home/src/tslibs/ts/lib/lib.es6.d.ts",
"../../animals/animal.ts",
"../../animals/index.ts",
"../core/utilities.d.ts",
@@ -479,7 +481,7 @@ export declare function createDog(): Dog;
]
],
"fileInfos": {
- "../../../../../../home/src/tslibs/ts/lib/lib.d.ts": {
+ "../../../../../../home/src/tslibs/ts/lib/lib.es6.d.ts": {
"original": {
"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
@@ -538,7 +540,7 @@ export declare function createDog(): Dog;
"outDir": "./",
"rootDir": "../../animals",
"strict": true,
- "target": 1
+ "target": 2
},
"referencedMap": {
"../../animals/dog.ts": [
@@ -552,14 +554,14 @@ export declare function createDog(): Dog;
},
"latestChangedDtsFile": "./dog.d.ts",
"version": "FakeTSVersion",
- "size": 2145
+ "size": 2149
}
//// [/user/username/projects/demo/lib/zoo/zoo.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createZoo = createZoo;
-var index_1 = require("../animals/index");
+const index_1 = require("../animals/index");
function createZoo() {
return [
(0, index_1.createDog)()
@@ -573,12 +575,12 @@ export declare function createZoo(): Array;
//// [/user/username/projects/demo/lib/zoo/tsconfig.tsbuildinfo]
-{"fileNames":["../../../../../../home/src/tslibs/ts/lib/lib.d.ts","../animals/animal.d.ts","../animals/dog.d.ts","../animals/index.d.ts","../../zoo/zoo.ts"],"fileIdsList":[[4],[2,3]],"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},"-9289341318-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n","6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n","1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n",{"version":"13034796418-import { Dog, createDog } from '../animals/index';\n\nexport function createZoo(): Array {\n return [\n createDog()\n ];\n}\n","signature":"10305066551-import { Dog } from '../animals/index';\nexport declare function createZoo(): Array;\n"}],"root":[5],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../zoo","strict":true,"target":1},"referencedMap":[[3,1],[4,2],[5,1]],"latestChangedDtsFile":"./zoo.d.ts","version":"FakeTSVersion"}
+{"fileNames":["../../../../../../home/src/tslibs/ts/lib/lib.es6.d.ts","../animals/animal.d.ts","../animals/dog.d.ts","../animals/index.d.ts","../../zoo/zoo.ts"],"fileIdsList":[[4],[2,3]],"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},"-9289341318-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n","6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n","1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n",{"version":"13034796418-import { Dog, createDog } from '../animals/index';\n\nexport function createZoo(): Array {\n return [\n createDog()\n ];\n}\n","signature":"10305066551-import { Dog } from '../animals/index';\nexport declare function createZoo(): Array;\n"}],"root":[5],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../zoo","strict":true,"target":2},"referencedMap":[[3,1],[4,2],[5,1]],"latestChangedDtsFile":"./zoo.d.ts","version":"FakeTSVersion"}
//// [/user/username/projects/demo/lib/zoo/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
- "../../../../../../home/src/tslibs/ts/lib/lib.d.ts",
+ "../../../../../../home/src/tslibs/ts/lib/lib.es6.d.ts",
"../animals/animal.d.ts",
"../animals/dog.d.ts",
"../animals/index.d.ts",
@@ -594,7 +596,7 @@ export declare function createZoo(): Array;
]
],
"fileInfos": {
- "../../../../../../home/src/tslibs/ts/lib/lib.d.ts": {
+ "../../../../../../home/src/tslibs/ts/lib/lib.es6.d.ts": {
"original": {
"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
@@ -641,7 +643,7 @@ export declare function createZoo(): Array;
"outDir": "./",
"rootDir": "../../zoo",
"strict": true,
- "target": 1
+ "target": 2
},
"referencedMap": {
"../animals/dog.d.ts": [
@@ -657,7 +659,7 @@ export declare function createZoo(): Array;
},
"latestChangedDtsFile": "./zoo.d.ts",
"version": "FakeTSVersion",
- "size": 1687
+ "size": 1691
}
diff --git a/tests/baselines/reference/tsbuild/demo/in-circular-branch-reports-the-error-about-it-by-stopping-build.js b/tests/baselines/reference/tsbuild/demo/in-circular-branch-reports-the-error-about-it-by-stopping-build.js
index e042e9ddead14..bfe6bde5bc3f7 100644
--- a/tests/baselines/reference/tsbuild/demo/in-circular-branch-reports-the-error-about-it-by-stopping-build.js
+++ b/tests/baselines/reference/tsbuild/demo/in-circular-branch-reports-the-error-about-it-by-stopping-build.js
@@ -102,7 +102,7 @@ export function createZoo(): Array {
{
"compilerOptions": {
"declaration": true,
- "target": "es5",
+ "target": "es2015",
"module": "commonjs",
"strict": true,
"noUnusedLocals": true,
diff --git a/tests/baselines/reference/tsbuild/demo/in-master-branch-with-everything-setup-correctly-and-reports-no-error.js b/tests/baselines/reference/tsbuild/demo/in-master-branch-with-everything-setup-correctly-and-reports-no-error.js
index ed673cf7b014e..0be6b1952720d 100644
--- a/tests/baselines/reference/tsbuild/demo/in-master-branch-with-everything-setup-correctly-and-reports-no-error.js
+++ b/tests/baselines/reference/tsbuild/demo/in-master-branch-with-everything-setup-correctly-and-reports-no-error.js
@@ -97,7 +97,7 @@ export function createZoo(): Array {
{
"compilerOptions": {
"declaration": true,
- "target": "es5",
+ "target": "es2015",
"module": "commonjs",
"strict": true,
"noUnusedLocals": true,
@@ -161,6 +161,8 @@ Output::
+//// [/home/src/tslibs/TS/Lib/lib.es6.d.ts] *Lib*
+
//// [/user/username/projects/demo/lib/core/utilities.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
@@ -182,16 +184,16 @@ export declare function lastElementOf(arr: T[]): T | undefined;
//// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo]
-{"fileNames":["../../../../../../home/src/tslibs/ts/lib/lib.d.ts","../../core/utilities.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":"-6723567162-export function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}\n","signature":"-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n"}],"root":[2],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../core","strict":true,"target":1},"latestChangedDtsFile":"./utilities.d.ts","version":"FakeTSVersion"}
+{"fileNames":["../../../../../../home/src/tslibs/ts/lib/lib.es6.d.ts","../../core/utilities.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":"-6723567162-export function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}\n","signature":"-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n"}],"root":[2],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../core","strict":true,"target":2},"latestChangedDtsFile":"./utilities.d.ts","version":"FakeTSVersion"}
//// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
- "../../../../../../home/src/tslibs/ts/lib/lib.d.ts",
+ "../../../../../../home/src/tslibs/ts/lib/lib.es6.d.ts",
"../../core/utilities.ts"
],
"fileInfos": {
- "../../../../../../home/src/tslibs/ts/lib/lib.d.ts": {
+ "../../../../../../home/src/tslibs/ts/lib/lib.es6.d.ts": {
"original": {
"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
@@ -226,11 +228,11 @@ export declare function lastElementOf(arr: T[]): T | undefined;
"outDir": "./",
"rootDir": "../../core",
"strict": true,
- "target": 1
+ "target": 2
},
"latestChangedDtsFile": "./utilities.d.ts",
"version": "FakeTSVersion",
- "size": 1235
+ "size": 1239
}
//// [/user/username/projects/demo/lib/animals/animal.js]
@@ -249,7 +251,7 @@ export default interface Animal {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createDog = void 0;
-var dog_1 = require("./dog");
+const dog_1 = require("./dog");
Object.defineProperty(exports, "createDog", { enumerable: true, get: function () { return dog_1.createDog; } });
@@ -264,12 +266,12 @@ export { createDog, Dog };
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createDog = createDog;
-var utilities_1 = require("../core/utilities");
+const utilities_1 = require("../core/utilities");
function createDog() {
return ({
size: "medium",
woof: function () {
- console.log("".concat(this.name, " says \"Woof\"!"));
+ console.log(`${this.name} says "Woof"!`);
},
name: (0, utilities_1.makeRandomName)()
});
@@ -286,12 +288,12 @@ export declare function createDog(): Dog;
//// [/user/username/projects/demo/lib/animals/tsconfig.tsbuildinfo]
-{"fileNames":["../../../../../../home/src/tslibs/ts/lib/lib.d.ts","../../animals/animal.ts","../../animals/index.ts","../core/utilities.d.ts","../../animals/dog.ts"],"fileIdsList":[[3,4],[2,5]],"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},"-9289341318-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n",{"version":"-7220553464-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n","signature":"1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n"},"-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n",{"version":"-18870194049-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}\n","signature":"6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n"}],"root":[2,3,5],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../animals","strict":true,"target":1},"referencedMap":[[5,1],[3,2]],"latestChangedDtsFile":"./dog.d.ts","version":"FakeTSVersion"}
+{"fileNames":["../../../../../../home/src/tslibs/ts/lib/lib.es6.d.ts","../../animals/animal.ts","../../animals/index.ts","../core/utilities.d.ts","../../animals/dog.ts"],"fileIdsList":[[3,4],[2,5]],"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},"-9289341318-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n",{"version":"-7220553464-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n","signature":"1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n"},"-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n",{"version":"-18870194049-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}\n","signature":"6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n"}],"root":[2,3,5],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../animals","strict":true,"target":2},"referencedMap":[[5,1],[3,2]],"latestChangedDtsFile":"./dog.d.ts","version":"FakeTSVersion"}
//// [/user/username/projects/demo/lib/animals/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
- "../../../../../../home/src/tslibs/ts/lib/lib.d.ts",
+ "../../../../../../home/src/tslibs/ts/lib/lib.es6.d.ts",
"../../animals/animal.ts",
"../../animals/index.ts",
"../core/utilities.d.ts",
@@ -308,7 +310,7 @@ export declare function createDog(): Dog;
]
],
"fileInfos": {
- "../../../../../../home/src/tslibs/ts/lib/lib.d.ts": {
+ "../../../../../../home/src/tslibs/ts/lib/lib.es6.d.ts": {
"original": {
"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
@@ -367,7 +369,7 @@ export declare function createDog(): Dog;
"outDir": "./",
"rootDir": "../../animals",
"strict": true,
- "target": 1
+ "target": 2
},
"referencedMap": {
"../../animals/dog.ts": [
@@ -381,14 +383,14 @@ export declare function createDog(): Dog;
},
"latestChangedDtsFile": "./dog.d.ts",
"version": "FakeTSVersion",
- "size": 2145
+ "size": 2149
}
//// [/user/username/projects/demo/lib/zoo/zoo.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createZoo = createZoo;
-var index_1 = require("../animals/index");
+const index_1 = require("../animals/index");
function createZoo() {
return [
(0, index_1.createDog)()
@@ -402,12 +404,12 @@ export declare function createZoo(): Array;
//// [/user/username/projects/demo/lib/zoo/tsconfig.tsbuildinfo]
-{"fileNames":["../../../../../../home/src/tslibs/ts/lib/lib.d.ts","../animals/animal.d.ts","../animals/dog.d.ts","../animals/index.d.ts","../../zoo/zoo.ts"],"fileIdsList":[[4],[2,3]],"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},"-9289341318-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n","6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n","1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n",{"version":"13034796418-import { Dog, createDog } from '../animals/index';\n\nexport function createZoo(): Array {\n return [\n createDog()\n ];\n}\n","signature":"10305066551-import { Dog } from '../animals/index';\nexport declare function createZoo(): Array;\n"}],"root":[5],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../zoo","strict":true,"target":1},"referencedMap":[[3,1],[4,2],[5,1]],"latestChangedDtsFile":"./zoo.d.ts","version":"FakeTSVersion"}
+{"fileNames":["../../../../../../home/src/tslibs/ts/lib/lib.es6.d.ts","../animals/animal.d.ts","../animals/dog.d.ts","../animals/index.d.ts","../../zoo/zoo.ts"],"fileIdsList":[[4],[2,3]],"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},"-9289341318-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n","6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n","1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n",{"version":"13034796418-import { Dog, createDog } from '../animals/index';\n\nexport function createZoo(): Array {\n return [\n createDog()\n ];\n}\n","signature":"10305066551-import { Dog } from '../animals/index';\nexport declare function createZoo(): Array;\n"}],"root":[5],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../zoo","strict":true,"target":2},"referencedMap":[[3,1],[4,2],[5,1]],"latestChangedDtsFile":"./zoo.d.ts","version":"FakeTSVersion"}
//// [/user/username/projects/demo/lib/zoo/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
- "../../../../../../home/src/tslibs/ts/lib/lib.d.ts",
+ "../../../../../../home/src/tslibs/ts/lib/lib.es6.d.ts",
"../animals/animal.d.ts",
"../animals/dog.d.ts",
"../animals/index.d.ts",
@@ -423,7 +425,7 @@ export declare function createZoo(): Array;
]
],
"fileInfos": {
- "../../../../../../home/src/tslibs/ts/lib/lib.d.ts": {
+ "../../../../../../home/src/tslibs/ts/lib/lib.es6.d.ts": {
"original": {
"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
@@ -470,7 +472,7 @@ export declare function createZoo(): Array;
"outDir": "./",
"rootDir": "../../zoo",
"strict": true,
- "target": 1
+ "target": 2
},
"referencedMap": {
"../animals/dog.d.ts": [
@@ -486,7 +488,7 @@ export declare function createZoo(): Array;
},
"latestChangedDtsFile": "./zoo.d.ts",
"version": "FakeTSVersion",
- "size": 1687
+ "size": 1691
}
diff --git a/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js b/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js
index 2df274a95c848..7d702d8d767e9 100644
--- a/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js
+++ b/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js
@@ -34,7 +34,7 @@ export { C } from "./c";
{
"compilerOptions": {
"incremental": true,
- "target": "es5",
+ "target": "es2015",
"module": "commonjs",
"declaration": true,
"declarationMap": true,
@@ -75,6 +75,8 @@ Output::
+//// [/home/src/tslibs/TS/Lib/lib.es6.d.ts] *Lib*
+
//// [/home/src/workspaces/project/lib/c.d.ts.map]
{"version":3,"file":"c.d.ts","sourceRoot":"","sources":["../src/c.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,CAAC;IACd,CAAC,EAAE,CAAC,CAAC;CACR"}
@@ -115,12 +117,12 @@ export { C } from "./c";
//# sourceMappingURL=index.d.ts.map
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo]
-{"fileNames":["../../tslibs/ts/lib/lib.d.ts","./src/c.ts","./src/b.ts","./src/a.ts","./src/index.ts"],"fileIdsList":[[3],[2],[4],[2,3,4]],"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":"3086446657-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","signature":"-3358372745-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n"},{"version":"-5791025721-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n","signature":"2102342013-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n"},{"version":"-10415053661-import { B } from \"./b\";\n\nexport interface A {\n b: B;\n}\n","signature":"-9690779495-import { B } from \"./b\";\nexport interface A {\n b: B;\n}\n"},"1286756397-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n"],"root":[[2,5]],"options":{"alwaysStrict":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":1},"referencedMap":[[4,1],[3,2],[2,3],[5,4]],"latestChangedDtsFile":"./lib/index.d.ts","version":"FakeTSVersion"}
+{"fileNames":["../../tslibs/ts/lib/lib.es6.d.ts","./src/c.ts","./src/b.ts","./src/a.ts","./src/index.ts"],"fileIdsList":[[3],[2],[4],[2,3,4]],"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":"3086446657-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","signature":"-3358372745-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n"},{"version":"-5791025721-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n","signature":"2102342013-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n"},{"version":"-10415053661-import { B } from \"./b\";\n\nexport interface A {\n b: B;\n}\n","signature":"-9690779495-import { B } from \"./b\";\nexport interface A {\n b: B;\n}\n"},"1286756397-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n"],"root":[[2,5]],"options":{"alwaysStrict":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":2},"referencedMap":[[4,1],[3,2],[2,3],[5,4]],"latestChangedDtsFile":"./lib/index.d.ts","version":"FakeTSVersion"}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
- "../../tslibs/ts/lib/lib.d.ts",
+ "../../tslibs/ts/lib/lib.es6.d.ts",
"./src/c.ts",
"./src/b.ts",
"./src/a.ts",
@@ -143,7 +145,7 @@ export { C } from "./c";
]
],
"fileInfos": {
- "../../tslibs/ts/lib/lib.d.ts": {
+ "../../tslibs/ts/lib/lib.es6.d.ts": {
"original": {
"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
@@ -207,7 +209,7 @@ export { C } from "./c";
"rootDir": "./src",
"sourceMap": true,
"strict": true,
- "target": 1
+ "target": 2
},
"referencedMap": {
"./src/a.ts": [
@@ -227,7 +229,7 @@ export { C } from "./c";
},
"latestChangedDtsFile": "./lib/index.d.ts",
"version": "FakeTSVersion",
- "size": 1593
+ "size": 1597
}
@@ -271,12 +273,12 @@ export interface A {
//// [/home/src/workspaces/project/lib/index.d.ts.map] file written with same contents
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo]
-{"fileNames":["../../tslibs/ts/lib/lib.d.ts","./src/c.ts","./src/b.ts","./src/a.ts","./src/index.ts"],"fileIdsList":[[3],[2],[4],[2,3,4]],"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":"3086446657-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","signature":"-3358372745-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n"},{"version":"-5791025721-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n","signature":"2102342013-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n"},{"version":"-4477156252-import { B } from \"./b\";\n\nexport interface A {\n b: B; foo: any;\n}\n","signature":"-7623824316-import { B } from \"./b\";\nexport interface A {\n b: B;\n foo: any;\n}\n"},"1286756397-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n"],"root":[[2,5]],"options":{"alwaysStrict":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":1},"referencedMap":[[4,1],[3,2],[2,3],[5,4]],"latestChangedDtsFile":"./lib/a.d.ts","version":"FakeTSVersion"}
+{"fileNames":["../../tslibs/ts/lib/lib.es6.d.ts","./src/c.ts","./src/b.ts","./src/a.ts","./src/index.ts"],"fileIdsList":[[3],[2],[4],[2,3,4]],"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":"3086446657-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","signature":"-3358372745-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n"},{"version":"-5791025721-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n","signature":"2102342013-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n"},{"version":"-4477156252-import { B } from \"./b\";\n\nexport interface A {\n b: B; foo: any;\n}\n","signature":"-7623824316-import { B } from \"./b\";\nexport interface A {\n b: B;\n foo: any;\n}\n"},"1286756397-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n"],"root":[[2,5]],"options":{"alwaysStrict":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":2},"referencedMap":[[4,1],[3,2],[2,3],[5,4]],"latestChangedDtsFile":"./lib/a.d.ts","version":"FakeTSVersion"}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
- "../../tslibs/ts/lib/lib.d.ts",
+ "../../tslibs/ts/lib/lib.es6.d.ts",
"./src/c.ts",
"./src/b.ts",
"./src/a.ts",
@@ -299,7 +301,7 @@ export interface A {
]
],
"fileInfos": {
- "../../tslibs/ts/lib/lib.d.ts": {
+ "../../tslibs/ts/lib/lib.es6.d.ts": {
"original": {
"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
@@ -363,7 +365,7 @@ export interface A {
"rootDir": "./src",
"sourceMap": true,
"strict": true,
- "target": 1
+ "target": 2
},
"referencedMap": {
"./src/a.ts": [
@@ -383,7 +385,7 @@ export interface A {
},
"latestChangedDtsFile": "./lib/a.d.ts",
"version": "FakeTSVersion",
- "size": 1613
+ "size": 1617
}
diff --git a/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js b/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js
index 5ae8de05d4e56..8cb97b045e7dd 100644
--- a/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js
+++ b/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js
@@ -34,7 +34,7 @@ export { C } from "./c";
{
"compilerOptions": {
"incremental": true,
- "target": "es5",
+ "target": "es2015",
"module": "commonjs",
"declaration": true,
@@ -75,6 +75,8 @@ Output::
+//// [/home/src/tslibs/TS/Lib/lib.es6.d.ts] *Lib*
+
//// [/home/src/workspaces/project/lib/c.d.ts]
import { A } from "./a";
export interface C {
@@ -103,12 +105,12 @@ export { C } from "./c";
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo]
-{"fileNames":["../../tslibs/ts/lib/lib.d.ts","./src/c.ts","./src/b.ts","./src/a.ts","./src/index.ts"],"fileIdsList":[[3],[2],[4],[2,3,4]],"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":"3086446657-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","signature":"-3358372745-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n"},{"version":"-5791025721-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n","signature":"2102342013-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n"},{"version":"-10415053661-import { B } from \"./b\";\n\nexport interface A {\n b: B;\n}\n","signature":"-9690779495-import { B } from \"./b\";\nexport interface A {\n b: B;\n}\n"},"1286756397-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n"],"root":[[2,5]],"options":{"alwaysStrict":true,"composite":true,"declaration":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":1},"referencedMap":[[4,1],[3,2],[2,3],[5,4]],"latestChangedDtsFile":"./lib/index.d.ts","version":"FakeTSVersion"}
+{"fileNames":["../../tslibs/ts/lib/lib.es6.d.ts","./src/c.ts","./src/b.ts","./src/a.ts","./src/index.ts"],"fileIdsList":[[3],[2],[4],[2,3,4]],"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":"3086446657-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","signature":"-3358372745-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n"},{"version":"-5791025721-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n","signature":"2102342013-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n"},{"version":"-10415053661-import { B } from \"./b\";\n\nexport interface A {\n b: B;\n}\n","signature":"-9690779495-import { B } from \"./b\";\nexport interface A {\n b: B;\n}\n"},"1286756397-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n"],"root":[[2,5]],"options":{"alwaysStrict":true,"composite":true,"declaration":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":2},"referencedMap":[[4,1],[3,2],[2,3],[5,4]],"latestChangedDtsFile":"./lib/index.d.ts","version":"FakeTSVersion"}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
- "../../tslibs/ts/lib/lib.d.ts",
+ "../../tslibs/ts/lib/lib.es6.d.ts",
"./src/c.ts",
"./src/b.ts",
"./src/a.ts",
@@ -131,7 +133,7 @@ export { C } from "./c";
]
],
"fileInfos": {
- "../../tslibs/ts/lib/lib.d.ts": {
+ "../../tslibs/ts/lib/lib.es6.d.ts": {
"original": {
"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
@@ -194,7 +196,7 @@ export { C } from "./c";
"rootDir": "./src",
"sourceMap": true,
"strict": true,
- "target": 1
+ "target": 2
},
"referencedMap": {
"./src/a.ts": [
@@ -214,7 +216,7 @@ export { C } from "./c";
},
"latestChangedDtsFile": "./lib/index.d.ts",
"version": "FakeTSVersion",
- "size": 1571
+ "size": 1575
}
@@ -252,12 +254,12 @@ export interface A {
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo]
-{"fileNames":["../../tslibs/ts/lib/lib.d.ts","./src/c.ts","./src/b.ts","./src/a.ts","./src/index.ts"],"fileIdsList":[[3],[2],[4],[2,3,4]],"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":"3086446657-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","signature":"-3358372745-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n"},{"version":"-5791025721-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n","signature":"2102342013-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n"},{"version":"-4477156252-import { B } from \"./b\";\n\nexport interface A {\n b: B; foo: any;\n}\n","signature":"-7623824316-import { B } from \"./b\";\nexport interface A {\n b: B;\n foo: any;\n}\n"},"1286756397-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n"],"root":[[2,5]],"options":{"alwaysStrict":true,"composite":true,"declaration":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":1},"referencedMap":[[4,1],[3,2],[2,3],[5,4]],"latestChangedDtsFile":"./lib/a.d.ts","version":"FakeTSVersion"}
+{"fileNames":["../../tslibs/ts/lib/lib.es6.d.ts","./src/c.ts","./src/b.ts","./src/a.ts","./src/index.ts"],"fileIdsList":[[3],[2],[4],[2,3,4]],"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":"3086446657-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","signature":"-3358372745-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n"},{"version":"-5791025721-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n","signature":"2102342013-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n"},{"version":"-4477156252-import { B } from \"./b\";\n\nexport interface A {\n b: B; foo: any;\n}\n","signature":"-7623824316-import { B } from \"./b\";\nexport interface A {\n b: B;\n foo: any;\n}\n"},"1286756397-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n"],"root":[[2,5]],"options":{"alwaysStrict":true,"composite":true,"declaration":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":2},"referencedMap":[[4,1],[3,2],[2,3],[5,4]],"latestChangedDtsFile":"./lib/a.d.ts","version":"FakeTSVersion"}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
- "../../tslibs/ts/lib/lib.d.ts",
+ "../../tslibs/ts/lib/lib.es6.d.ts",
"./src/c.ts",
"./src/b.ts",
"./src/a.ts",
@@ -280,7 +282,7 @@ export interface A {
]
],
"fileInfos": {
- "../../tslibs/ts/lib/lib.d.ts": {
+ "../../tslibs/ts/lib/lib.es6.d.ts": {
"original": {
"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
@@ -343,7 +345,7 @@ export interface A {
"rootDir": "./src",
"sourceMap": true,
"strict": true,
- "target": 1
+ "target": 2
},
"referencedMap": {
"./src/a.ts": [
@@ -363,7 +365,7 @@ export interface A {
},
"latestChangedDtsFile": "./lib/a.d.ts",
"version": "FakeTSVersion",
- "size": 1591
+ "size": 1595
}
diff --git a/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js b/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js
index 901ac552b9e0d..9e2710beb2813 100644
--- a/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js
+++ b/tests/baselines/reference/tsbuild/emitDeclarationOnly/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js
@@ -28,7 +28,7 @@ export interface C {
{
"compilerOptions": {
"incremental": true,
- "target": "es5",
+ "target": "es2015",
"module": "commonjs",
"declaration": true,
"declarationMap": true,
@@ -69,6 +69,8 @@ Output::
+//// [/home/src/tslibs/TS/Lib/lib.es6.d.ts] *Lib*
+
//// [/home/src/workspaces/project/lib/a.d.ts.map]
{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["../src/a.ts"],"names":[],"mappings":"AAAA,qBAAa,CAAC;IAAG,IAAI,SAAW;CAAE;AAElC,MAAM,WAAW,CAAC;IACd,CAAC,EAAE,CAAC,CAAC;CACR"}
@@ -102,12 +104,12 @@ export interface B {
//# sourceMappingURL=b.d.ts.map
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo]
-{"fileNames":["../../tslibs/ts/lib/lib.d.ts","./src/a.ts","./src/c.ts","./src/b.ts"],"fileIdsList":[[3],[2]],"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":"12550013887-export class B { prop = \"hello\"; }\n\nexport interface A {\n b: B;\n}\n","signature":"-15427030283-export declare class B {\n prop: string;\n}\nexport interface A {\n b: B;\n}\n"},{"version":"3086446657-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","signature":"-3358372745-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n"},{"version":"-5791025721-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n","signature":"2102342013-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n"}],"root":[[2,4]],"options":{"alwaysStrict":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":1},"referencedMap":[[4,1],[3,2]],"latestChangedDtsFile":"./lib/b.d.ts","version":"FakeTSVersion"}
+{"fileNames":["../../tslibs/ts/lib/lib.es6.d.ts","./src/a.ts","./src/c.ts","./src/b.ts"],"fileIdsList":[[3],[2]],"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":"12550013887-export class B { prop = \"hello\"; }\n\nexport interface A {\n b: B;\n}\n","signature":"-15427030283-export declare class B {\n prop: string;\n}\nexport interface A {\n b: B;\n}\n"},{"version":"3086446657-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","signature":"-3358372745-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n"},{"version":"-5791025721-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n","signature":"2102342013-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n"}],"root":[[2,4]],"options":{"alwaysStrict":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":2},"referencedMap":[[4,1],[3,2]],"latestChangedDtsFile":"./lib/b.d.ts","version":"FakeTSVersion"}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
- "../../tslibs/ts/lib/lib.d.ts",
+ "../../tslibs/ts/lib/lib.es6.d.ts",
"./src/a.ts",
"./src/c.ts",
"./src/b.ts"
@@ -121,7 +123,7 @@ export interface B {
]
],
"fileInfos": {
- "../../tslibs/ts/lib/lib.d.ts": {
+ "../../tslibs/ts/lib/lib.es6.d.ts": {
"original": {
"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
@@ -180,7 +182,7 @@ export interface B {
"rootDir": "./src",
"sourceMap": true,
"strict": true,
- "target": 1
+ "target": 2
},
"referencedMap": {
"./src/b.ts": [
@@ -192,7 +194,7 @@ export interface B {
},
"latestChangedDtsFile": "./lib/b.d.ts",
"version": "FakeTSVersion",
- "size": 1480
+ "size": 1484
}
@@ -226,12 +228,12 @@ Output::
{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["../src/a.ts"],"names":[],"mappings":"AAAA,qBAAa,CAAC;IAAG,IAAI,SAAW;CAAE;AAGlC,MAAM,WAAW,CAAC;IACd,CAAC,EAAE,CAAC,CAAC;CACR"}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo]
-{"fileNames":["../../tslibs/ts/lib/lib.d.ts","./src/a.ts","./src/c.ts","./src/b.ts"],"fileIdsList":[[3],[2]],"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":"12921437274-export class B { prop = \"hello\"; }\n\nclass C { }\nexport interface A {\n b: B;\n}\n","signature":"-15427030283-export declare class B {\n prop: string;\n}\nexport interface A {\n b: B;\n}\n"},{"version":"3086446657-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","signature":"-3358372745-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n"},{"version":"-5791025721-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n","signature":"2102342013-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n"}],"root":[[2,4]],"options":{"alwaysStrict":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":1},"referencedMap":[[4,1],[3,2]],"latestChangedDtsFile":"./lib/b.d.ts","version":"FakeTSVersion"}
+{"fileNames":["../../tslibs/ts/lib/lib.es6.d.ts","./src/a.ts","./src/c.ts","./src/b.ts"],"fileIdsList":[[3],[2]],"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":"12921437274-export class B { prop = \"hello\"; }\n\nclass C { }\nexport interface A {\n b: B;\n}\n","signature":"-15427030283-export declare class B {\n prop: string;\n}\nexport interface A {\n b: B;\n}\n"},{"version":"3086446657-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","signature":"-3358372745-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n"},{"version":"-5791025721-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n","signature":"2102342013-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n"}],"root":[[2,4]],"options":{"alwaysStrict":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":2},"referencedMap":[[4,1],[3,2]],"latestChangedDtsFile":"./lib/b.d.ts","version":"FakeTSVersion"}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
- "../../tslibs/ts/lib/lib.d.ts",
+ "../../tslibs/ts/lib/lib.es6.d.ts",
"./src/a.ts",
"./src/c.ts",
"./src/b.ts"
@@ -245,7 +247,7 @@ Output::
]
],
"fileInfos": {
- "../../tslibs/ts/lib/lib.d.ts": {
+ "../../tslibs/ts/lib/lib.es6.d.ts": {
"original": {
"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
@@ -304,7 +306,7 @@ Output::
"rootDir": "./src",
"sourceMap": true,
"strict": true,
- "target": 1
+ "target": 2
},
"referencedMap": {
"./src/b.ts": [
@@ -316,7 +318,7 @@ Output::
},
"latestChangedDtsFile": "./lib/b.d.ts",
"version": "FakeTSVersion",
- "size": 1493
+ "size": 1497
}
@@ -362,12 +364,12 @@ export interface A {
//// [/home/src/workspaces/project/lib/c.d.ts.map] file written with same contents
//// [/home/src/workspaces/project/lib/b.d.ts.map] file written with same contents
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo]
-{"fileNames":["../../tslibs/ts/lib/lib.d.ts","./src/a.ts","./src/c.ts","./src/b.ts"],"fileIdsList":[[3],[2]],"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":"17511804123-export class B { prop = \"hello\"; }\n\nclass C { }\nexport interface A {\n b: B; foo: any;\n}\n","signature":"-21227085920-export declare class B {\n prop: string;\n}\nexport interface A {\n b: B;\n foo: any;\n}\n"},{"version":"3086446657-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","signature":"-3358372745-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n"},{"version":"-5791025721-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n","signature":"2102342013-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n"}],"root":[[2,4]],"options":{"alwaysStrict":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":1},"referencedMap":[[4,1],[3,2]],"latestChangedDtsFile":"./lib/a.d.ts","version":"FakeTSVersion"}
+{"fileNames":["../../tslibs/ts/lib/lib.es6.d.ts","./src/a.ts","./src/c.ts","./src/b.ts"],"fileIdsList":[[3],[2]],"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":"17511804123-export class B { prop = \"hello\"; }\n\nclass C { }\nexport interface A {\n b: B; foo: any;\n}\n","signature":"-21227085920-export declare class B {\n prop: string;\n}\nexport interface A {\n b: B;\n foo: any;\n}\n"},{"version":"3086446657-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n","signature":"-3358372745-import { A } from \"./a\";\nexport interface C {\n a: A;\n}\n"},{"version":"-5791025721-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n","signature":"2102342013-import { C } from \"./c\";\nexport interface B {\n b: C;\n}\n"}],"root":[[2,4]],"options":{"alwaysStrict":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":1,"outDir":"./lib","rootDir":"./src","sourceMap":true,"strict":true,"target":2},"referencedMap":[[4,1],[3,2]],"latestChangedDtsFile":"./lib/a.d.ts","version":"FakeTSVersion"}
//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
- "../../tslibs/ts/lib/lib.d.ts",
+ "../../tslibs/ts/lib/lib.es6.d.ts",
"./src/a.ts",
"./src/c.ts",
"./src/b.ts"
@@ -381,7 +383,7 @@ export interface A {
]
],
"fileInfos": {
- "../../tslibs/ts/lib/lib.d.ts": {
+ "../../tslibs/ts/lib/lib.es6.d.ts": {
"original": {
"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
@@ -440,7 +442,7 @@ export interface A {
"rootDir": "./src",
"sourceMap": true,
"strict": true,
- "target": 1
+ "target": 2
},
"referencedMap": {
"./src/b.ts": [
@@ -452,7 +454,7 @@ export interface A {
},
"latestChangedDtsFile": "./lib/a.d.ts",
"version": "FakeTSVersion",
- "size": 1518
+ "size": 1522
}
diff --git a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/inferred-type-from-transitive-module-with-isolatedModules.js b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/inferred-type-from-transitive-module-with-isolatedModules.js
index dac0625965da4..7644c17e15f69 100644
--- a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/inferred-type-from-transitive-module-with-isolatedModules.js
+++ b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/inferred-type-from-transitive-module-with-isolatedModules.js
@@ -50,7 +50,7 @@ export { default as bar } from './bar';
//// [/home/src/workspaces/project/tsconfig.json]
{
"compilerOptions": {
- "target": "es5",
+ "target": "es2015",
"declaration": true,
"outDir": "obj",
"incremental": true, "isolatedModules": true
@@ -81,12 +81,20 @@ Output::
[[90mHH:MM:SS AM[0m] Building project '/home/src/workspaces/project/tsconfig.json'...
+[96mindex.ts[0m:[93m3[0m:[93m5[0m - [91merror[0m[90m TS1323: [0mDynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
+
+[7m3[0m import('./lazyIndex')
+[7m [0m [91m ~~~~~~~~~~~~~~~~~~~~~[0m
+
+
+Found 1 error.
+
+
+//// [/home/src/tslibs/TS/Lib/lib.es6.d.ts] *Lib*
//// [/home/src/workspaces/project/obj/bar.js]
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.default = foo()(function foobar(param) {
+export default foo()(function foobar(param) {
});
@@ -96,22 +104,15 @@ export default _default;
//// [/home/src/workspaces/project/obj/bundling.js]
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.LazyAction = exports.LazyModule = void 0;
-var LazyModule = /** @class */ (function () {
- function LazyModule(importCallback) {
+export class LazyModule {
+ constructor(importCallback) {
this.importCallback = importCallback;
}
- return LazyModule;
-}());
-exports.LazyModule = LazyModule;
-var LazyAction = /** @class */ (function () {
- function LazyAction(_lazyModule, _getter) {
+}
+export class LazyAction {
+ constructor(_lazyModule, _getter) {
}
- return LazyAction;
-}());
-exports.LazyAction = LazyAction;
+}
//// [/home/src/workspaces/project/obj/bundling.d.ts]
@@ -125,14 +126,7 @@ export declare class LazyAction any, TModule
//// [/home/src/workspaces/project/obj/lazyIndex.js]
-"use strict";
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.bar = void 0;
-var bar_1 = require("./bar");
-Object.defineProperty(exports, "bar", { enumerable: true, get: function () { return __importDefault(bar_1).default; } });
+export { default as bar } from './bar';
//// [/home/src/workspaces/project/obj/lazyIndex.d.ts]
@@ -140,47 +134,9 @@ export { default as bar } from './bar';
//// [/home/src/workspaces/project/obj/index.js]
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.lazyBar = void 0;
-var bundling_1 = require("./bundling");
-var lazyModule = new bundling_1.LazyModule(function () {
- return Promise.resolve().then(function () { return __importStar(require('./lazyIndex')); });
-});
-exports.lazyBar = new bundling_1.LazyAction(lazyModule, function (m) { return m.bar; });
+import { LazyAction, LazyModule } from './bundling';
+const lazyModule = new LazyModule(() => import('./lazyIndex'));
+export const lazyBar = new LazyAction(lazyModule, m => m.bar);
//// [/home/src/workspaces/project/obj/index.d.ts]
@@ -189,12 +145,12 @@ export declare const lazyBar: LazyAction<(param: string) => void, typeof import(
//// [/home/src/workspaces/project/obj/tsconfig.tsbuildinfo]
-{"fileNames":["../../../tslibs/ts/lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileIdsList":[[3,5],[2]],"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":"9420269200-interface RawAction {\n (...args: any[]): Promise | void;\n}\ninterface ActionFactory {\n (target: T): T;\n}\ndeclare function foo(): ActionFactory;\nexport default foo()(function foobar(param: string): void {\n});\n","signature":"1630430607-declare const _default: (param: string) => void;\nexport default _default;\n"},{"version":"-5105594088-export class LazyModule {\n constructor(private importCallback: () => Promise) {}\n}\n\nexport class LazyAction<\n TAction extends (...args: any[]) => any,\n TModule\n> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\n }\n}\n","signature":"-23343356903-export declare class LazyModule {\n private importCallback;\n constructor(importCallback: () => Promise);\n}\nexport declare class LazyAction any, TModule> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\n}\n"},{"version":"-20910599262-interface PromiseConstructor {\n new (): Promise;\n}\ndeclare var Promise: PromiseConstructor;\ninterface Promise {\n}\n","affectsGlobalScope":true},"-6956449754-export { default as bar } from './bar';\n",{"version":"6186344161-import { LazyAction, LazyModule } from './bundling';\nconst lazyModule = new LazyModule(() =>\n import('./lazyIndex')\n);\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);\n","signature":"-13696684486-import { LazyAction } from './bundling';\nexport declare const lazyBar: LazyAction<(param: string) => void, typeof import(\"./lazyIndex\")>;\n"}],"root":[[2,6]],"options":{"declaration":true,"outDir":"./","target":1},"referencedMap":[[6,1],[5,2]],"version":"FakeTSVersion"}
+{"fileNames":["../../../tslibs/ts/lib/lib.es6.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileIdsList":[[3,5],[2]],"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":"9420269200-interface RawAction {\n (...args: any[]): Promise | void;\n}\ninterface ActionFactory {\n (target: T): T;\n}\ndeclare function foo(): ActionFactory;\nexport default foo()(function foobar(param: string): void {\n});\n","signature":"1630430607-declare const _default: (param: string) => void;\nexport default _default;\n"},{"version":"-5105594088-export class LazyModule {\n constructor(private importCallback: () => Promise) {}\n}\n\nexport class LazyAction<\n TAction extends (...args: any[]) => any,\n TModule\n> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\n }\n}\n","signature":"-23343356903-export declare class LazyModule {\n private importCallback;\n constructor(importCallback: () => Promise);\n}\nexport declare class LazyAction any, TModule> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\n}\n"},{"version":"-20910599262-interface PromiseConstructor {\n new (): Promise;\n}\ndeclare var Promise: PromiseConstructor;\ninterface Promise {\n}\n","affectsGlobalScope":true},"-6956449754-export { default as bar } from './bar';\n",{"version":"6186344161-import { LazyAction, LazyModule } from './bundling';\nconst lazyModule = new LazyModule(() =>\n import('./lazyIndex')\n);\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);\n","signature":"-13696684486-import { LazyAction } from './bundling';\nexport declare const lazyBar: LazyAction<(param: string) => void, typeof import(\"./lazyIndex\")>;\n"}],"root":[[2,6]],"options":{"declaration":true,"outDir":"./","target":2},"referencedMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[[6,[{"start":97,"length":21,"messageText":"Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.","category":1,"code":1323}]]],"version":"FakeTSVersion"}
//// [/home/src/workspaces/project/obj/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
- "../../../tslibs/ts/lib/lib.d.ts",
+ "../../../tslibs/ts/lib/lib.es6.d.ts",
"../bar.ts",
"../bundling.ts",
"../global.d.ts",
@@ -211,7 +167,7 @@ export declare const lazyBar: LazyAction<(param: string) => void, typeof import(
]
],
"fileInfos": {
- "../../../tslibs/ts/lib/lib.d.ts": {
+ "../../../tslibs/ts/lib/lib.es6.d.ts": {
"original": {
"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
@@ -276,7 +232,7 @@ export declare const lazyBar: LazyAction<(param: string) => void, typeof import(
"options": {
"declaration": true,
"outDir": "./",
- "target": 1
+ "target": 2
},
"referencedMap": {
"../index.ts": [
@@ -287,12 +243,26 @@ export declare const lazyBar: LazyAction<(param: string) => void, typeof import(
"../bar.ts"
]
},
+ "semanticDiagnosticsPerFile": [
+ [
+ "../index.ts",
+ [
+ {
+ "start": 97,
+ "length": 21,
+ "messageText": "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.",
+ "category": 1,
+ "code": 1323
+ }
+ ]
+ ]
+ ],
"version": "FakeTSVersion",
- "size": 2432
+ "size": 2720
}
-exitCode:: ExitStatus.Success
+exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped
Change:: incremental-declaration-changes
@@ -315,16 +285,22 @@ Output::
[[90mHH:MM:SS AM[0m] Projects in this build:
* tsconfig.json
-[[90mHH:MM:SS AM[0m] Project 'tsconfig.json' is out of date because output 'obj/tsconfig.tsbuildinfo' is older than input 'bar.ts'
+[[90mHH:MM:SS AM[0m] Project 'tsconfig.json' is out of date because buildinfo file 'obj/tsconfig.tsbuildinfo' indicates that program needs to report errors.
[[90mHH:MM:SS AM[0m] Building project '/home/src/workspaces/project/tsconfig.json'...
+[96mindex.ts[0m:[93m3[0m:[93m5[0m - [91merror[0m[90m TS1323: [0mDynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
+
+[7m3[0m import('./lazyIndex')
+[7m [0m [91m ~~~~~~~~~~~~~~~~~~~~~[0m
+
+
+Found 1 error.
+
//// [/home/src/workspaces/project/obj/bar.js]
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.default = foo()(function foobar() {
+export default foo()(function foobar() {
});
@@ -340,12 +316,12 @@ export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex"
//// [/home/src/workspaces/project/obj/tsconfig.tsbuildinfo]
-{"fileNames":["../../../tslibs/ts/lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileIdsList":[[3,5],[2]],"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":"10075719182-interface RawAction {\n (...args: any[]): Promise | void;\n}\ninterface ActionFactory {\n (target: T): T;\n}\ndeclare function foo(): ActionFactory;\nexport default foo()(function foobar(): void {\n});\n","signature":"-1866892563-declare const _default: () => void;\nexport default _default;\n"},{"version":"-5105594088-export class LazyModule {\n constructor(private importCallback: () => Promise) {}\n}\n\nexport class LazyAction<\n TAction extends (...args: any[]) => any,\n TModule\n> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\n }\n}\n","signature":"-23343356903-export declare class LazyModule {\n private importCallback;\n constructor(importCallback: () => Promise);\n}\nexport declare class LazyAction any, TModule> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\n}\n"},{"version":"-20910599262-interface PromiseConstructor {\n new (): Promise;\n}\ndeclare var Promise: PromiseConstructor;\ninterface Promise {\n}\n","affectsGlobalScope":true},"-6956449754-export { default as bar } from './bar';\n",{"version":"6186344161-import { LazyAction, LazyModule } from './bundling';\nconst lazyModule = new LazyModule(() =>\n import('./lazyIndex')\n);\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);\n","signature":"-4053129224-import { LazyAction } from './bundling';\nexport declare const lazyBar: LazyAction<() => void, typeof import(\"./lazyIndex\")>;\n"}],"root":[[2,6]],"options":{"declaration":true,"outDir":"./","target":1},"referencedMap":[[6,1],[5,2]],"version":"FakeTSVersion"}
+{"fileNames":["../../../tslibs/ts/lib/lib.es6.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileIdsList":[[3,5],[2]],"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":"10075719182-interface RawAction {\n (...args: any[]): Promise | void;\n}\ninterface ActionFactory {\n (target: T): T;\n}\ndeclare function foo(): ActionFactory;\nexport default foo()(function foobar(): void {\n});\n","signature":"-1866892563-declare const _default: () => void;\nexport default _default;\n"},{"version":"-5105594088-export class LazyModule {\n constructor(private importCallback: () => Promise) {}\n}\n\nexport class LazyAction<\n TAction extends (...args: any[]) => any,\n TModule\n> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\n }\n}\n","signature":"-23343356903-export declare class LazyModule {\n private importCallback;\n constructor(importCallback: () => Promise);\n}\nexport declare class LazyAction any, TModule> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\n}\n"},{"version":"-20910599262-interface PromiseConstructor {\n new (): Promise;\n}\ndeclare var Promise: PromiseConstructor;\ninterface Promise {\n}\n","affectsGlobalScope":true},"-6956449754-export { default as bar } from './bar';\n",{"version":"6186344161-import { LazyAction, LazyModule } from './bundling';\nconst lazyModule = new LazyModule(() =>\n import('./lazyIndex')\n);\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);\n","signature":"-4053129224-import { LazyAction } from './bundling';\nexport declare const lazyBar: LazyAction<() => void, typeof import(\"./lazyIndex\")>;\n"}],"root":[[2,6]],"options":{"declaration":true,"outDir":"./","target":2},"referencedMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[[6,[{"start":97,"length":21,"messageText":"Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.","category":1,"code":1323}]]],"version":"FakeTSVersion"}
//// [/home/src/workspaces/project/obj/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
- "../../../tslibs/ts/lib/lib.d.ts",
+ "../../../tslibs/ts/lib/lib.es6.d.ts",
"../bar.ts",
"../bundling.ts",
"../global.d.ts",
@@ -362,7 +338,7 @@ export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex"
]
],
"fileInfos": {
- "../../../tslibs/ts/lib/lib.d.ts": {
+ "../../../tslibs/ts/lib/lib.es6.d.ts": {
"original": {
"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
@@ -427,7 +403,7 @@ export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex"
"options": {
"declaration": true,
"outDir": "./",
- "target": 1
+ "target": 2
},
"referencedMap": {
"../index.ts": [
@@ -438,12 +414,26 @@ export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex"
"../bar.ts"
]
},
+ "semanticDiagnosticsPerFile": [
+ [
+ "../index.ts",
+ [
+ {
+ "start": 97,
+ "length": 21,
+ "messageText": "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.",
+ "category": 1,
+ "code": 1323
+ }
+ ]
+ ]
+ ],
"version": "FakeTSVersion",
- "size": 2394
+ "size": 2682
}
-exitCode:: ExitStatus.Success
+exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped
Change:: incremental-declaration-changes
@@ -466,16 +456,22 @@ Output::
[[90mHH:MM:SS AM[0m] Projects in this build:
* tsconfig.json
-[[90mHH:MM:SS AM[0m] Project 'tsconfig.json' is out of date because output 'obj/tsconfig.tsbuildinfo' is older than input 'bar.ts'
+[[90mHH:MM:SS AM[0m] Project 'tsconfig.json' is out of date because buildinfo file 'obj/tsconfig.tsbuildinfo' indicates that program needs to report errors.
[[90mHH:MM:SS AM[0m] Building project '/home/src/workspaces/project/tsconfig.json'...
+[96mindex.ts[0m:[93m3[0m:[93m5[0m - [91merror[0m[90m TS1323: [0mDynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
+
+[7m3[0m import('./lazyIndex')
+[7m [0m [91m ~~~~~~~~~~~~~~~~~~~~~[0m
+
+
+Found 1 error.
+
//// [/home/src/workspaces/project/obj/bar.js]
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.default = foo()(function foobar(param) {
+export default foo()(function foobar(param) {
});
@@ -491,12 +487,12 @@ export declare const lazyBar: LazyAction<(param: string) => void, typeof import(
//// [/home/src/workspaces/project/obj/tsconfig.tsbuildinfo]
-{"fileNames":["../../../tslibs/ts/lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileIdsList":[[3,5],[2]],"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":"9420269200-interface RawAction {\n (...args: any[]): Promise | void;\n}\ninterface ActionFactory {\n (target: T): T;\n}\ndeclare function foo(): ActionFactory;\nexport default foo()(function foobar(param: string): void {\n});\n","signature":"1630430607-declare const _default: (param: string) => void;\nexport default _default;\n"},{"version":"-5105594088-export class LazyModule {\n constructor(private importCallback: () => Promise) {}\n}\n\nexport class LazyAction<\n TAction extends (...args: any[]) => any,\n TModule\n> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\n }\n}\n","signature":"-23343356903-export declare class LazyModule {\n private importCallback;\n constructor(importCallback: () => Promise);\n}\nexport declare class LazyAction any, TModule> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\n}\n"},{"version":"-20910599262-interface PromiseConstructor {\n new (): Promise;\n}\ndeclare var Promise: PromiseConstructor;\ninterface Promise {\n}\n","affectsGlobalScope":true},"-6956449754-export { default as bar } from './bar';\n",{"version":"6186344161-import { LazyAction, LazyModule } from './bundling';\nconst lazyModule = new LazyModule(() =>\n import('./lazyIndex')\n);\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);\n","signature":"-13696684486-import { LazyAction } from './bundling';\nexport declare const lazyBar: LazyAction<(param: string) => void, typeof import(\"./lazyIndex\")>;\n"}],"root":[[2,6]],"options":{"declaration":true,"outDir":"./","target":1},"referencedMap":[[6,1],[5,2]],"version":"FakeTSVersion"}
+{"fileNames":["../../../tslibs/ts/lib/lib.es6.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileIdsList":[[3,5],[2]],"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":"9420269200-interface RawAction {\n (...args: any[]): Promise | void;\n}\ninterface ActionFactory {\n (target: T): T;\n}\ndeclare function foo(): ActionFactory;\nexport default foo()(function foobar(param: string): void {\n});\n","signature":"1630430607-declare const _default: (param: string) => void;\nexport default _default;\n"},{"version":"-5105594088-export class LazyModule {\n constructor(private importCallback: () => Promise) {}\n}\n\nexport class LazyAction<\n TAction extends (...args: any[]) => any,\n TModule\n> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\n }\n}\n","signature":"-23343356903-export declare class LazyModule {\n private importCallback;\n constructor(importCallback: () => Promise);\n}\nexport declare class LazyAction any, TModule> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\n}\n"},{"version":"-20910599262-interface PromiseConstructor {\n new (): Promise;\n}\ndeclare var Promise: PromiseConstructor;\ninterface Promise {\n}\n","affectsGlobalScope":true},"-6956449754-export { default as bar } from './bar';\n",{"version":"6186344161-import { LazyAction, LazyModule } from './bundling';\nconst lazyModule = new LazyModule(() =>\n import('./lazyIndex')\n);\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);\n","signature":"-13696684486-import { LazyAction } from './bundling';\nexport declare const lazyBar: LazyAction<(param: string) => void, typeof import(\"./lazyIndex\")>;\n"}],"root":[[2,6]],"options":{"declaration":true,"outDir":"./","target":2},"referencedMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[[6,[{"start":97,"length":21,"messageText":"Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.","category":1,"code":1323}]]],"version":"FakeTSVersion"}
//// [/home/src/workspaces/project/obj/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
- "../../../tslibs/ts/lib/lib.d.ts",
+ "../../../tslibs/ts/lib/lib.es6.d.ts",
"../bar.ts",
"../bundling.ts",
"../global.d.ts",
@@ -513,7 +509,7 @@ export declare const lazyBar: LazyAction<(param: string) => void, typeof import(
]
],
"fileInfos": {
- "../../../tslibs/ts/lib/lib.d.ts": {
+ "../../../tslibs/ts/lib/lib.es6.d.ts": {
"original": {
"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
@@ -578,7 +574,7 @@ export declare const lazyBar: LazyAction<(param: string) => void, typeof import(
"options": {
"declaration": true,
"outDir": "./",
- "target": 1
+ "target": 2
},
"referencedMap": {
"../index.ts": [
@@ -589,9 +585,23 @@ export declare const lazyBar: LazyAction<(param: string) => void, typeof import(
"../bar.ts"
]
},
+ "semanticDiagnosticsPerFile": [
+ [
+ "../index.ts",
+ [
+ {
+ "start": 97,
+ "length": 21,
+ "messageText": "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.",
+ "category": 1,
+ "code": 1323
+ }
+ ]
+ ]
+ ],
"version": "FakeTSVersion",
- "size": 2432
+ "size": 2720
}
-exitCode:: ExitStatus.Success
+exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped
diff --git a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/inferred-type-from-transitive-module.js b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/inferred-type-from-transitive-module.js
index fc8c35a240e3b..4c6610c43c906 100644
--- a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/inferred-type-from-transitive-module.js
+++ b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/inferred-type-from-transitive-module.js
@@ -50,7 +50,7 @@ export { default as bar } from './bar';
//// [/home/src/workspaces/project/tsconfig.json]
{
"compilerOptions": {
- "target": "es5",
+ "target": "es2015",
"declaration": true,
"outDir": "obj",
"incremental": true
@@ -81,12 +81,20 @@ Output::
[[90mHH:MM:SS AM[0m] Building project '/home/src/workspaces/project/tsconfig.json'...
+[96mindex.ts[0m:[93m3[0m:[93m5[0m - [91merror[0m[90m TS1323: [0mDynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
+
+[7m3[0m import('./lazyIndex')
+[7m [0m [91m ~~~~~~~~~~~~~~~~~~~~~[0m
+
+
+Found 1 error.
+
+
+//// [/home/src/tslibs/TS/Lib/lib.es6.d.ts] *Lib*
//// [/home/src/workspaces/project/obj/bar.js]
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.default = foo()(function foobar(param) {
+export default foo()(function foobar(param) {
});
@@ -96,22 +104,15 @@ export default _default;
//// [/home/src/workspaces/project/obj/bundling.js]
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.LazyAction = exports.LazyModule = void 0;
-var LazyModule = /** @class */ (function () {
- function LazyModule(importCallback) {
+export class LazyModule {
+ constructor(importCallback) {
this.importCallback = importCallback;
}
- return LazyModule;
-}());
-exports.LazyModule = LazyModule;
-var LazyAction = /** @class */ (function () {
- function LazyAction(_lazyModule, _getter) {
+}
+export class LazyAction {
+ constructor(_lazyModule, _getter) {
}
- return LazyAction;
-}());
-exports.LazyAction = LazyAction;
+}
//// [/home/src/workspaces/project/obj/bundling.d.ts]
@@ -125,14 +126,7 @@ export declare class LazyAction any, TModule
//// [/home/src/workspaces/project/obj/lazyIndex.js]
-"use strict";
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.bar = void 0;
-var bar_1 = require("./bar");
-Object.defineProperty(exports, "bar", { enumerable: true, get: function () { return __importDefault(bar_1).default; } });
+export { default as bar } from './bar';
//// [/home/src/workspaces/project/obj/lazyIndex.d.ts]
@@ -140,47 +134,9 @@ export { default as bar } from './bar';
//// [/home/src/workspaces/project/obj/index.js]
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.lazyBar = void 0;
-var bundling_1 = require("./bundling");
-var lazyModule = new bundling_1.LazyModule(function () {
- return Promise.resolve().then(function () { return __importStar(require('./lazyIndex')); });
-});
-exports.lazyBar = new bundling_1.LazyAction(lazyModule, function (m) { return m.bar; });
+import { LazyAction, LazyModule } from './bundling';
+const lazyModule = new LazyModule(() => import('./lazyIndex'));
+export const lazyBar = new LazyAction(lazyModule, m => m.bar);
//// [/home/src/workspaces/project/obj/index.d.ts]
@@ -189,12 +145,12 @@ export declare const lazyBar: LazyAction<(param: string) => void, typeof import(
//// [/home/src/workspaces/project/obj/tsconfig.tsbuildinfo]
-{"fileNames":["../../../tslibs/ts/lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileIdsList":[[3,5],[2]],"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":"9420269200-interface RawAction {\n (...args: any[]): Promise | void;\n}\ninterface ActionFactory {\n (target: T): T;\n}\ndeclare function foo(): ActionFactory;\nexport default foo()(function foobar(param: string): void {\n});\n","signature":"1630430607-declare const _default: (param: string) => void;\nexport default _default;\n"},{"version":"-5105594088-export class LazyModule {\n constructor(private importCallback: () => Promise) {}\n}\n\nexport class LazyAction<\n TAction extends (...args: any[]) => any,\n TModule\n> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\n }\n}\n","signature":"-23343356903-export declare class LazyModule {\n private importCallback;\n constructor(importCallback: () => Promise);\n}\nexport declare class LazyAction any, TModule> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\n}\n"},{"version":"-20910599262-interface PromiseConstructor {\n new (): Promise;\n}\ndeclare var Promise: PromiseConstructor;\ninterface Promise {\n}\n","affectsGlobalScope":true},"-6956449754-export { default as bar } from './bar';\n",{"version":"6186344161-import { LazyAction, LazyModule } from './bundling';\nconst lazyModule = new LazyModule(() =>\n import('./lazyIndex')\n);\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);\n","signature":"-13696684486-import { LazyAction } from './bundling';\nexport declare const lazyBar: LazyAction<(param: string) => void, typeof import(\"./lazyIndex\")>;\n"}],"root":[[2,6]],"options":{"declaration":true,"outDir":"./","target":1},"referencedMap":[[6,1],[5,2]],"version":"FakeTSVersion"}
+{"fileNames":["../../../tslibs/ts/lib/lib.es6.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileIdsList":[[3,5],[2]],"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":"9420269200-interface RawAction {\n (...args: any[]): Promise | void;\n}\ninterface ActionFactory {\n (target: T): T;\n}\ndeclare function foo(): ActionFactory;\nexport default foo()(function foobar(param: string): void {\n});\n","signature":"1630430607-declare const _default: (param: string) => void;\nexport default _default;\n"},{"version":"-5105594088-export class LazyModule {\n constructor(private importCallback: () => Promise) {}\n}\n\nexport class LazyAction<\n TAction extends (...args: any[]) => any,\n TModule\n> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\n }\n}\n","signature":"-23343356903-export declare class LazyModule {\n private importCallback;\n constructor(importCallback: () => Promise);\n}\nexport declare class LazyAction any, TModule> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\n}\n"},{"version":"-20910599262-interface PromiseConstructor {\n new (): Promise;\n}\ndeclare var Promise: PromiseConstructor;\ninterface Promise {\n}\n","affectsGlobalScope":true},"-6956449754-export { default as bar } from './bar';\n",{"version":"6186344161-import { LazyAction, LazyModule } from './bundling';\nconst lazyModule = new LazyModule(() =>\n import('./lazyIndex')\n);\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);\n","signature":"-13696684486-import { LazyAction } from './bundling';\nexport declare const lazyBar: LazyAction<(param: string) => void, typeof import(\"./lazyIndex\")>;\n"}],"root":[[2,6]],"options":{"declaration":true,"outDir":"./","target":2},"referencedMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[[6,[{"start":97,"length":21,"messageText":"Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.","category":1,"code":1323}]]],"version":"FakeTSVersion"}
//// [/home/src/workspaces/project/obj/tsconfig.tsbuildinfo.readable.baseline.txt]
{
"fileNames": [
- "../../../tslibs/ts/lib/lib.d.ts",
+ "../../../tslibs/ts/lib/lib.es6.d.ts",
"../bar.ts",
"../bundling.ts",
"../global.d.ts",
@@ -211,7 +167,7 @@ export declare const lazyBar: LazyAction<(param: string) => void, typeof import(
]
],
"fileInfos": {
- "../../../tslibs/ts/lib/lib.d.ts": {
+ "../../../tslibs/ts/lib/lib.es6.d.ts": {
"original": {
"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
@@ -276,7 +232,7 @@ export declare const lazyBar: LazyAction<(param: string) => void, typeof import(
"options": {
"declaration": true,
"outDir": "./",
- "target": 1
+ "target": 2
},
"referencedMap": {
"../index.ts": [
@@ -287,12 +243,26 @@ export declare const lazyBar: LazyAction<(param: string) => void, typeof import(
"../bar.ts"
]
},
+ "semanticDiagnosticsPerFile": [
+ [
+ "../index.ts",
+ [
+ {
+ "start": 97,
+ "length": 21,
+ "messageText": "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.",
+ "category": 1,
+ "code": 1323
+ }
+ ]
+ ]
+ ],
"version": "FakeTSVersion",
- "size": 2432
+ "size": 2720
}
-exitCode:: ExitStatus.Success
+exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped
Change:: incremental-declaration-changes
@@ -315,16 +285,22 @@ Output::
[[90mHH:MM:SS AM[0m] Projects in this build:
* tsconfig.json
-[[90mHH:MM:SS AM[0m] Project 'tsconfig.json' is out of date because output 'obj/tsconfig.tsbuildinfo' is older than input 'bar.ts'
+[[90mHH:MM:SS AM[0m] Project 'tsconfig.json' is out of date because buildinfo file 'obj/tsconfig.tsbuildinfo' indicates that program needs to report errors.
[[90mHH:MM:SS AM[0m] Building project '/home/src/workspaces/project/tsconfig.json'...
+[96mindex.ts[0m:[93m3[0m:[93m5[0m - [91merror[0m[90m TS1323: [0mDynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
+
+[7m3[0m import('./lazyIndex')
+[7m [0m [91m ~~~~~~~~~~~~~~~~~~~~~[0m
+
+
+Found 1 error.
+
//// [/home/src/workspaces/project/obj/bar.js]
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.default = foo()(function foobar() {
+export default foo()(function foobar() {
});
@@ -341,12 +317,12 @@ export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex"
//// [/home/src/workspaces/project/obj/tsconfig.tsbuildinfo]
-{"fileNames":["../../../tslibs/ts/lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileIdsList":[[3,5],[2]],"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":"10075719182-interface RawAction {\n (...args: any[]): Promise | void;\n}\ninterface ActionFactory {\n (target: T): T;\n}\ndeclare function foo(): ActionFactory;\nexport default foo()(function foobar(): void {\n});\n","signature":"-1866892563-declare const _default: () => void;\nexport default _default;\n"},{"version":"-5105594088-export class LazyModule {\n constructor(private importCallback: () => Promise) {}\n}\n\nexport class LazyAction<\n TAction extends (...args: any[]) => any,\n TModule\n> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\n }\n}\n","signature":"-23343356903-export declare class LazyModule