;
declare var mp: MyPromise;
diff --git a/tests/baselines/reference/augmentExportEquals1.js b/tests/baselines/reference/augmentExportEquals1.js
index 4fa10b893d7e1..6bc25d7e71bc1 100644
--- a/tests/baselines/reference/augmentExportEquals1.js
+++ b/tests/baselines/reference/augmentExportEquals1.js
@@ -19,19 +19,14 @@ import "./file2";
let a: x.A; // should not work
//// [file1.js]
-define(["require", "exports"], function (require, exports) {
- "use strict";
- var x = 1;
- return x;
-});
+"use strict";
+var x = 1;
+module.exports = x;
//// [file2.js]
-define(["require", "exports"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
-});
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
//// [file3.js]
-define(["require", "exports", "./file2"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- var a; // should not work
-});
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+require("./file2");
+var a; // should not work
diff --git a/tests/baselines/reference/augmentExportEquals1_1.errors.txt b/tests/baselines/reference/augmentExportEquals1_1.errors.txt
index 2d4719c215c6a..67a0cb5a1c6b0 100644
--- a/tests/baselines/reference/augmentExportEquals1_1.errors.txt
+++ b/tests/baselines/reference/augmentExportEquals1_1.errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
file2.ts(6,16): error TS2671: Cannot augment module 'file1' because it resolves to a non-module entity.
file3.ts(3,8): error TS2503: Cannot find namespace 'x'.
+!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== file3.ts (1 errors) ====
import x = require("file1");
import "file2";
diff --git a/tests/baselines/reference/augmentExportEquals2.js b/tests/baselines/reference/augmentExportEquals2.js
index 7f3a825133794..e565f18dd087a 100644
--- a/tests/baselines/reference/augmentExportEquals2.js
+++ b/tests/baselines/reference/augmentExportEquals2.js
@@ -18,19 +18,14 @@ import "./file2";
let a: x.A; // should not work
//// [file1.js]
-define(["require", "exports"], function (require, exports) {
- "use strict";
- function foo() { }
- return foo;
-});
+"use strict";
+function foo() { }
+module.exports = foo;
//// [file2.js]
-define(["require", "exports"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
-});
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
//// [file3.js]
-define(["require", "exports", "./file2"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- var a; // should not work
-});
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+require("./file2");
+var a; // should not work
diff --git a/tests/baselines/reference/augmentExportEquals2_1.errors.txt b/tests/baselines/reference/augmentExportEquals2_1.errors.txt
index f03369da40d65..bb0f4e78d9ccf 100644
--- a/tests/baselines/reference/augmentExportEquals2_1.errors.txt
+++ b/tests/baselines/reference/augmentExportEquals2_1.errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
file2.ts(5,16): error TS2671: Cannot augment module 'file1' because it resolves to a non-module entity.
file3.ts(3,8): error TS2503: Cannot find namespace 'x'.
+!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== file3.ts (1 errors) ====
import x = require("file1");
import "file2";
diff --git a/tests/baselines/reference/augmentExportEquals3.js b/tests/baselines/reference/augmentExportEquals3.js
index c17f666c24afe..7f07f319f774f 100644
--- a/tests/baselines/reference/augmentExportEquals3.js
+++ b/tests/baselines/reference/augmentExportEquals3.js
@@ -24,21 +24,19 @@ let a: x.A;
let b = x.b;
//// [file1.js]
-define(["require", "exports"], function (require, exports) {
- "use strict";
- function foo() { }
- (function (foo) {
- foo.v = 1;
- })(foo || (foo = {}));
- return foo;
-});
+"use strict";
+function foo() { }
+(function (foo) {
+ foo.v = 1;
+})(foo || (foo = {}));
+module.exports = foo;
//// [file2.js]
-define(["require", "exports", "./file1"], function (require, exports, x) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- x.b = 1;
-});
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var x = require("./file1");
+x.b = 1;
//// [file3.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);
@@ -72,10 +70,8 @@ var __importStar = (this && this.__importStar) || (function () {
return result;
};
})();
-define(["require", "exports", "./file1", "./file2"], function (require, exports, x) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- x = __importStar(x);
- var a;
- var b = x.b;
-});
+Object.defineProperty(exports, "__esModule", { value: true });
+var x = __importStar(require("./file1"));
+require("./file2");
+var a;
+var b = x.b;
diff --git a/tests/baselines/reference/augmentExportEquals3_1.errors.txt b/tests/baselines/reference/augmentExportEquals3_1.errors.txt
new file mode 100644
index 0000000000000..dbcff1cce46e3
--- /dev/null
+++ b/tests/baselines/reference/augmentExportEquals3_1.errors.txt
@@ -0,0 +1,30 @@
+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.
+==== file1.d.ts (0 errors) ====
+ declare module "file1" {
+ function foo(): void;
+ namespace foo {
+ export var v: number;
+ }
+ export = foo;
+ }
+
+
+==== file2.ts (0 errors) ====
+ ///
+ import x = require("file1");
+ x.b = 1;
+
+ // OK - './file1' is a namespace
+ declare module "file1" {
+ interface A { a }
+ let b: number;
+ }
+
+==== file3.ts (0 errors) ====
+ import * as x from "file1";
+ import "file2";
+ let a: x.A;
+ let b = x.b;
\ No newline at end of file
diff --git a/tests/baselines/reference/augmentExportEquals3_1.types b/tests/baselines/reference/augmentExportEquals3_1.types
index 684978016dd03..0cb8ad7e4c188 100644
--- a/tests/baselines/reference/augmentExportEquals3_1.types
+++ b/tests/baselines/reference/augmentExportEquals3_1.types
@@ -48,6 +48,7 @@ declare module "file1" {
interface A { a }
>a : any
+> : ^^^
let b: number;
>b : number
diff --git a/tests/baselines/reference/augmentExportEquals4.js b/tests/baselines/reference/augmentExportEquals4.js
index 3cd96ee115474..fd55f8017fcb1 100644
--- a/tests/baselines/reference/augmentExportEquals4.js
+++ b/tests/baselines/reference/augmentExportEquals4.js
@@ -24,25 +24,23 @@ let a: x.A;
let b = x.b;
//// [file1.js]
-define(["require", "exports"], function (require, exports) {
- "use strict";
- var foo = /** @class */ (function () {
- function foo() {
- }
- return foo;
- }());
- (function (foo) {
- foo.v = 1;
- })(foo || (foo = {}));
+"use strict";
+var foo = /** @class */ (function () {
+ function foo() {
+ }
return foo;
-});
+}());
+(function (foo) {
+ foo.v = 1;
+})(foo || (foo = {}));
+module.exports = foo;
//// [file2.js]
-define(["require", "exports", "./file1"], function (require, exports, x) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- x.b = 1;
-});
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var x = require("./file1");
+x.b = 1;
//// [file3.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);
@@ -76,10 +74,8 @@ var __importStar = (this && this.__importStar) || (function () {
return result;
};
})();
-define(["require", "exports", "./file1", "./file2"], function (require, exports, x) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- x = __importStar(x);
- var a;
- var b = x.b;
-});
+Object.defineProperty(exports, "__esModule", { value: true });
+var x = __importStar(require("./file1"));
+require("./file2");
+var a;
+var b = x.b;
diff --git a/tests/baselines/reference/augmentExportEquals4_1.errors.txt b/tests/baselines/reference/augmentExportEquals4_1.errors.txt
new file mode 100644
index 0000000000000..138b715c5122d
--- /dev/null
+++ b/tests/baselines/reference/augmentExportEquals4_1.errors.txt
@@ -0,0 +1,30 @@
+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.
+==== file1.d.ts (0 errors) ====
+ declare module "file1" {
+ class foo {}
+ namespace foo {
+ export var v: number;
+ }
+ export = foo;
+ }
+
+
+==== file2.ts (0 errors) ====
+ ///
+ import x = require("file1");
+ x.b = 1;
+
+ // OK - './file1' is a namespace
+ declare module "file1" {
+ interface A { a }
+ let b: number;
+ }
+
+==== file3.ts (0 errors) ====
+ import * as x from "file1";
+ import "file2";
+ let a: x.A;
+ let b = x.b;
\ No newline at end of file
diff --git a/tests/baselines/reference/augmentExportEquals4_1.types b/tests/baselines/reference/augmentExportEquals4_1.types
index fddef2aaacf91..564b3a9d55e58 100644
--- a/tests/baselines/reference/augmentExportEquals4_1.types
+++ b/tests/baselines/reference/augmentExportEquals4_1.types
@@ -48,6 +48,7 @@ declare module "file1" {
interface A { a }
>a : any
+> : ^^^
let b: number;
>b : number
diff --git a/tests/baselines/reference/augmentExportEquals5.js b/tests/baselines/reference/augmentExportEquals5.js
index 03ef32a071954..70efe35ff7f67 100644
--- a/tests/baselines/reference/augmentExportEquals5.js
+++ b/tests/baselines/reference/augmentExportEquals5.js
@@ -81,14 +81,11 @@ let x: Request;
const y = x.id;
//// [augmentation.js]
-define(["require", "exports"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
-});
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
//// [consumer.js]
-define(["require", "exports", "./augmentation"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- var x;
- var y = x.id;
-});
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+require("./augmentation");
+var x;
+var y = x.id;
diff --git a/tests/baselines/reference/augmentExportEquals6.js b/tests/baselines/reference/augmentExportEquals6.js
index 328b74696e0f6..5dc782ed8552e 100644
--- a/tests/baselines/reference/augmentExportEquals6.js
+++ b/tests/baselines/reference/augmentExportEquals6.js
@@ -28,33 +28,31 @@ let b = a.a;
let c = x.B.b;
//// [file1.js]
-define(["require", "exports"], function (require, exports) {
- "use strict";
- var foo = /** @class */ (function () {
- function foo() {
+"use strict";
+var foo = /** @class */ (function () {
+ function foo() {
+ }
+ return foo;
+}());
+(function (foo) {
+ var A = /** @class */ (function () {
+ function A() {
}
- return foo;
+ return A;
}());
- (function (foo) {
- var A = /** @class */ (function () {
- function A() {
- }
- return A;
- }());
- foo.A = A;
- var B;
- (function (B) {
- })(B = foo.B || (foo.B = {}));
- })(foo || (foo = {}));
- return foo;
-});
+ foo.A = A;
+ var B;
+ (function (B) {
+ })(B = foo.B || (foo.B = {}));
+})(foo || (foo = {}));
+module.exports = foo;
//// [file2.js]
-define(["require", "exports", "./file1"], function (require, exports, x) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- x.B.b = 1;
-});
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var x = require("./file1");
+x.B.b = 1;
//// [file3.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);
@@ -88,11 +86,9 @@ var __importStar = (this && this.__importStar) || (function () {
return result;
};
})();
-define(["require", "exports", "./file1", "./file2"], function (require, exports, x) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- x = __importStar(x);
- var a;
- var b = a.a;
- var c = x.B.b;
-});
+Object.defineProperty(exports, "__esModule", { value: true });
+var x = __importStar(require("./file1"));
+require("./file2");
+var a;
+var b = a.a;
+var c = x.B.b;
diff --git a/tests/baselines/reference/augmentExportEquals6_1.errors.txt b/tests/baselines/reference/augmentExportEquals6_1.errors.txt
new file mode 100644
index 0000000000000..3afd16d251826
--- /dev/null
+++ b/tests/baselines/reference/augmentExportEquals6_1.errors.txt
@@ -0,0 +1,28 @@
+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.
+==== file1.d.ts (0 errors) ====
+ declare module "file1" {
+ class foo {}
+ namespace foo {
+ class A {}
+ }
+ export = foo;
+ }
+
+
+==== file2.ts (0 errors) ====
+ ///
+ import x = require("file1");
+
+ // OK - './file1' is a namespace
+ declare module "file1" {
+ interface A { a: number }
+ }
+
+==== file3.ts (0 errors) ====
+ import * as x from "file1";
+ import "file2";
+ let a: x.A;
+ let b = a.a;
\ No newline at end of file
diff --git a/tests/baselines/reference/augmentedTypesExternalModule1.errors.txt b/tests/baselines/reference/augmentedTypesExternalModule1.errors.txt
new file mode 100644
index 0000000000000..ebcf0f2eb2e4a
--- /dev/null
+++ b/tests/baselines/reference/augmentedTypesExternalModule1.errors.txt
@@ -0,0 +1,8 @@
+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.
+==== augmentedTypesExternalModule1.ts (0 errors) ====
+ export var a = 1;
+ class c5 { public foo() { } }
+ namespace c5 { } // should be ok everywhere
\ No newline at end of file
diff --git a/tests/baselines/reference/autoAccessorDisallowedModifiers(target=es2017).errors.txt b/tests/baselines/reference/autoAccessorDisallowedModifiers(target=es2017).errors.txt
index 666dd521e5f15..e9a61f9407b9c 100644
--- a/tests/baselines/reference/autoAccessorDisallowedModifiers(target=es2017).errors.txt
+++ b/tests/baselines/reference/autoAccessorDisallowedModifiers(target=es2017).errors.txt
@@ -25,7 +25,7 @@ autoAccessorDisallowedModifiers.ts(33,1): error TS1275: 'accessor' modifier can
autoAccessorDisallowedModifiers.ts(34,1): error TS1275: 'accessor' modifier can only appear on a property declaration.
autoAccessorDisallowedModifiers.ts(34,17): error TS2882: Cannot find module or type declarations for side-effect import of 'x'.
autoAccessorDisallowedModifiers.ts(35,1): error TS1275: 'accessor' modifier can only appear on a property declaration.
-autoAccessorDisallowedModifiers.ts(35,25): error TS2792: Cannot find module 'x'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
+autoAccessorDisallowedModifiers.ts(35,25): error TS2307: Cannot find module 'x' or its corresponding type declarations.
autoAccessorDisallowedModifiers.ts(36,1): error TS1275: 'accessor' modifier can only appear on a property declaration.
autoAccessorDisallowedModifiers.ts(37,1): error TS1275: 'accessor' modifier can only appear on a property declaration.
autoAccessorDisallowedModifiers.ts(38,1): error TS1275: 'accessor' modifier can only appear on a property declaration.
@@ -122,7 +122,7 @@ autoAccessorDisallowedModifiers.ts(38,1): error TS1275: 'accessor' modifier can
~~~~~~~~
!!! error TS1275: 'accessor' modifier can only appear on a property declaration.
~~~
-!!! error TS2792: Cannot find module 'x'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
+!!! error TS2307: Cannot find module 'x' or its corresponding type declarations.
accessor export { V1 };
~~~~~~~~
!!! error TS1275: 'accessor' modifier can only appear on a property declaration.
diff --git a/tests/baselines/reference/autoAccessorDisallowedModifiers(target=esnext).errors.txt b/tests/baselines/reference/autoAccessorDisallowedModifiers(target=esnext).errors.txt
index 666dd521e5f15..e9a61f9407b9c 100644
--- a/tests/baselines/reference/autoAccessorDisallowedModifiers(target=esnext).errors.txt
+++ b/tests/baselines/reference/autoAccessorDisallowedModifiers(target=esnext).errors.txt
@@ -25,7 +25,7 @@ autoAccessorDisallowedModifiers.ts(33,1): error TS1275: 'accessor' modifier can
autoAccessorDisallowedModifiers.ts(34,1): error TS1275: 'accessor' modifier can only appear on a property declaration.
autoAccessorDisallowedModifiers.ts(34,17): error TS2882: Cannot find module or type declarations for side-effect import of 'x'.
autoAccessorDisallowedModifiers.ts(35,1): error TS1275: 'accessor' modifier can only appear on a property declaration.
-autoAccessorDisallowedModifiers.ts(35,25): error TS2792: Cannot find module 'x'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
+autoAccessorDisallowedModifiers.ts(35,25): error TS2307: Cannot find module 'x' or its corresponding type declarations.
autoAccessorDisallowedModifiers.ts(36,1): error TS1275: 'accessor' modifier can only appear on a property declaration.
autoAccessorDisallowedModifiers.ts(37,1): error TS1275: 'accessor' modifier can only appear on a property declaration.
autoAccessorDisallowedModifiers.ts(38,1): error TS1275: 'accessor' modifier can only appear on a property declaration.
@@ -122,7 +122,7 @@ autoAccessorDisallowedModifiers.ts(38,1): error TS1275: 'accessor' modifier can
~~~~~~~~
!!! error TS1275: 'accessor' modifier can only appear on a property declaration.
~~~
-!!! error TS2792: Cannot find module 'x'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
+!!! error TS2307: Cannot find module 'x' or its corresponding type declarations.
accessor export { V1 };
~~~~~~~~
!!! error TS1275: 'accessor' modifier can only appear on a property declaration.
diff --git a/tests/baselines/reference/awaitUsingDeclarationsTopLevelOfModule.1(module=system).errors.txt b/tests/baselines/reference/awaitUsingDeclarationsTopLevelOfModule.1(module=system).errors.txt
new file mode 100644
index 0000000000000..a07b1781038df
--- /dev/null
+++ b/tests/baselines/reference/awaitUsingDeclarationsTopLevelOfModule.1(module=system).errors.txt
@@ -0,0 +1,18 @@
+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.
+==== awaitUsingDeclarationsTopLevelOfModule.1.ts (0 errors) ====
+ export const x = 1;
+ export { y };
+
+ await using z = { async [Symbol.asyncDispose]() {} };
+
+ const y = 2;
+
+ export const w = 3;
+
+ export default 4;
+
+ console.log(w, x, y, z);
+
\ No newline at end of file
diff --git a/tests/baselines/reference/badExternalModuleReference.errors.txt b/tests/baselines/reference/badExternalModuleReference.errors.txt
index ade3bfb43c0f7..3e8f3872296e5 100644
--- a/tests/baselines/reference/badExternalModuleReference.errors.txt
+++ b/tests/baselines/reference/badExternalModuleReference.errors.txt
@@ -1,10 +1,10 @@
-badExternalModuleReference.ts(1,21): error TS2792: Cannot find module 'garbage'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
+badExternalModuleReference.ts(1,21): error TS2307: Cannot find module 'garbage' or its corresponding type declarations.
==== badExternalModuleReference.ts (1 errors) ====
import a1 = require("garbage");
~~~~~~~~~
-!!! error TS2792: Cannot find module 'garbage'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
+!!! error TS2307: Cannot find module 'garbage' or its corresponding type declarations.
export declare var a: {
test1: a1.connectModule;
(): a1.connectExport;
diff --git a/tests/baselines/reference/badExternalModuleReference.js b/tests/baselines/reference/badExternalModuleReference.js
index 4f5d7e4cc2d8a..017e5d940fb2c 100644
--- a/tests/baselines/reference/badExternalModuleReference.js
+++ b/tests/baselines/reference/badExternalModuleReference.js
@@ -9,7 +9,5 @@ export declare var a: {
//// [badExternalModuleReference.js]
-define(["require", "exports"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
-});
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/tests/baselines/reference/bangInModuleName.errors.txt b/tests/baselines/reference/bangInModuleName.errors.txt
new file mode 100644
index 0000000000000..779592b870ea1
--- /dev/null
+++ b/tests/baselines/reference/bangInModuleName.errors.txt
@@ -0,0 +1,17 @@
+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.
+==== a.ts (0 errors) ====
+ ///
+
+ import * as http from 'intern/dojo/node!http';
+==== a.d.ts (0 errors) ====
+ declare module "http" {
+ }
+
+ declare module 'intern/dojo/node!http' {
+ import http = require('http');
+ export = http;
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.errors.txt b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.errors.txt
index 175fd5671a294..f958ba0e0570a 100644
--- a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.errors.txt
+++ b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.errors.txt
@@ -1,12 +1,9 @@
-blockScopedFunctionDeclarationInStrictModule.ts(2,14): error TS1252: Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Modules are automatically in strict mode.
blockScopedFunctionDeclarationInStrictModule.ts(6,10): error TS2304: Cannot find name 'foo'.
-==== blockScopedFunctionDeclarationInStrictModule.ts (2 errors) ====
+==== blockScopedFunctionDeclarationInStrictModule.ts (1 errors) ====
if (true) {
function foo() { }
- ~~~
-!!! error TS1252: Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Modules are automatically in strict mode.
foo(); // ok
}
diff --git a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.js b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.js
index 512bc5d032753..e7c00bb07a24b 100644
--- a/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.js
+++ b/tests/baselines/reference/blockScopedFunctionDeclarationInStrictModule.js
@@ -9,11 +9,9 @@ if (true) {
export = foo; // not ok
//// [blockScopedFunctionDeclarationInStrictModule.js]
-define(["require", "exports"], function (require, exports) {
- "use strict";
- if (true) {
- function foo() { }
- foo(); // ok
- }
- return foo;
-});
+"use strict";
+if (true) {
+ function foo() { }
+ foo(); // ok
+}
+module.exports = foo;
diff --git a/tests/baselines/reference/blockScopedNamespaceDifferentFile.errors.txt b/tests/baselines/reference/blockScopedNamespaceDifferentFile.errors.txt
new file mode 100644
index 0000000000000..fa5f3d7a5cc72
--- /dev/null
+++ b/tests/baselines/reference/blockScopedNamespaceDifferentFile.errors.txt
@@ -0,0 +1,22 @@
+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.
+==== test.ts (0 errors) ====
+ namespace C {
+ export class Name {
+ static funcData = A.AA.func();
+ static someConst = A.AA.foo;
+
+ constructor(parameters) {}
+ }
+ }
+
+==== typings.d.ts (0 errors) ====
+ declare namespace A {
+ namespace AA {
+ function func(): number;
+ const foo = "";
+ }
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/blockScopedNamespaceDifferentFile.types b/tests/baselines/reference/blockScopedNamespaceDifferentFile.types
index e5529ff6a51f7..e64b0e174c0e6 100644
--- a/tests/baselines/reference/blockScopedNamespaceDifferentFile.types
+++ b/tests/baselines/reference/blockScopedNamespaceDifferentFile.types
@@ -41,6 +41,7 @@ namespace C {
constructor(parameters) {}
>parameters : any
+> : ^^^
}
}
diff --git a/tests/baselines/reference/cacheResolutions.errors.txt b/tests/baselines/reference/cacheResolutions.errors.txt
new file mode 100644
index 0000000000000..99544b47178b5
--- /dev/null
+++ b/tests/baselines/reference/cacheResolutions.errors.txt
@@ -0,0 +1,12 @@
+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.
+==== /a/b/c/app.ts (0 errors) ====
+ export let x = 1;
+
+==== /a/b/c/lib1.ts (0 errors) ====
+ export let x = 1;
+
+==== /a/b/c/lib2.ts (0 errors) ====
+ export let x = 1;
\ No newline at end of file
diff --git a/tests/baselines/reference/cachedModuleResolution3.errors.txt b/tests/baselines/reference/cachedModuleResolution3.errors.txt
new file mode 100644
index 0000000000000..a215118639b4d
--- /dev/null
+++ b/tests/baselines/reference/cachedModuleResolution3.errors.txt
@@ -0,0 +1,12 @@
+error TS5107: Option 'moduleResolution=classic' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+
+
+!!! error TS5107: Option 'moduleResolution=classic' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== /a/b/foo.d.ts (0 errors) ====
+ export declare let x: number
+
+==== /a/b/c/d/e/app.ts (0 errors) ====
+ import {x} from "foo";
+
+==== /a/b/c/lib.ts (0 errors) ====
+ import {x} from "foo";
\ No newline at end of file
diff --git a/tests/baselines/reference/cachedModuleResolution4.errors.txt b/tests/baselines/reference/cachedModuleResolution4.errors.txt
new file mode 100644
index 0000000000000..dbee47cdf6822
--- /dev/null
+++ b/tests/baselines/reference/cachedModuleResolution4.errors.txt
@@ -0,0 +1,13 @@
+error TS5107: Option 'moduleResolution=classic' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+
+
+!!! error TS5107: Option 'moduleResolution=classic' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
+==== /a/b/foo.d.ts (0 errors) ====
+ export declare let x: number
+
+==== /a/b/c/lib.ts (0 errors) ====
+ import {x} from "foo";
+
+==== /a/b/c/d/e/app.ts (0 errors) ====
+ import {x} from "foo";
+
\ No newline at end of file
diff --git a/tests/baselines/reference/cachedModuleResolution8.errors.txt b/tests/baselines/reference/cachedModuleResolution8.errors.txt
index 454954606fd73..c507bb0e52655 100644
--- a/tests/baselines/reference/cachedModuleResolution8.errors.txt
+++ b/tests/baselines/reference/cachedModuleResolution8.errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'moduleResolution=classic' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
/a/b/c/d/e/app.ts(1,17): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
/a/b/c/lib.ts(1,17): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
+!!! error TS5107: Option 'moduleResolution=classic' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== /a/b/c/d/e/app.ts (1 errors) ====
import {x} from "foo";
~~~~~
diff --git a/tests/baselines/reference/cachedModuleResolution9.errors.txt b/tests/baselines/reference/cachedModuleResolution9.errors.txt
index 5c56ae758db02..73ac6316facb1 100644
--- a/tests/baselines/reference/cachedModuleResolution9.errors.txt
+++ b/tests/baselines/reference/cachedModuleResolution9.errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'moduleResolution=classic' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
/a/b/c/d/e/app.ts(1,17): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
/a/b/c/lib.ts(1,17): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
+!!! error TS5107: Option 'moduleResolution=classic' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== /a/b/c/lib.ts (1 errors) ====
import {x} from "foo";
~~~~~
diff --git a/tests/baselines/reference/capturedLetConstInLoop4.errors.txt b/tests/baselines/reference/capturedLetConstInLoop4.errors.txt
new file mode 100644
index 0000000000000..8c5a24ed95a1c
--- /dev/null
+++ b/tests/baselines/reference/capturedLetConstInLoop4.errors.txt
@@ -0,0 +1,147 @@
+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.
+==== capturedLetConstInLoop4.ts (0 errors) ====
+ //======let
+ export function exportedFoo() {
+ return v0 + v00 + v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8;
+ }
+
+ for (let x of []) {
+ var v0 = x;
+ (function() { return x + v0});
+ (() => x);
+ }
+
+ for (let x in []) {
+ var v00 = x;
+ (function() { return x + v00});
+ (() => x);
+ }
+
+ for (let x = 0; x < 1; ++x) {
+ var v1 = x;
+ (function() { return x + v1});
+ (() => x);
+ }
+
+ while (1 === 1) {
+ let x;
+ var v2 = x;
+ (function() { return x + v2});
+ (() => x);
+ }
+
+ do {
+ let x;
+ var v3 = x;
+ (function() { return x + v3});
+ (() => x);
+ } while (1 === 1)
+
+ for (let y = 0; y < 1; ++y) {
+ let x = 1;
+ var v4 = x;
+ (function() { return x + v4});
+ (() => x);
+ }
+
+ for (let x = 0, y = 1; x < 1; ++x) {
+ var v5 = x;
+ (function() { return x + y + v5});
+ (() => x + y);
+ }
+
+ while (1 === 1) {
+ let x, y;
+ var v6 = x;
+ (function() { return x + y + v6});
+ (() => x + y);
+ }
+
+ do {
+ let x, y;
+ var v7 = x;
+ (function() { return x + y + v7});
+ (() => x + y);
+ } while (1 === 1)
+
+ for (let y = 0; y < 1; ++y) {
+ let x = 1;
+ var v8 = x;
+ (function() { return x + y + v8});
+ (() => x + y);
+ }
+
+ //======const
+ export function exportedFoo2() {
+ return v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c + v6_c + v7_c + v8_c;
+ }
+
+ for (const x of []) {
+ var v0_c = x;
+ (function() { return x + v0_c});
+ (() => x);
+ }
+
+ for (const x in []) {
+ var v00_c = x;
+ (function() { return x + v00});
+ (() => x);
+ }
+
+ for (const x = 0; x < 1;) {
+ var v1_c = x;
+ (function() { return x + v1_c});
+ (() => x);
+ }
+
+ while (1 === 1) {
+ const x =1;
+ var v2_c = x;
+ (function() { return x + v2_c});
+ (() => x);
+ }
+
+ do {
+ const x = 1;
+ var v3_c = x;
+ (function() { return x + v3_c});
+ (() => x);
+ } while (1 === 1)
+
+ for (const y = 0; y < 1;) {
+ const x = 1;
+ var v4_c = x;
+ (function() { return x + v4_c});
+ (() => x);
+ }
+
+ for (const x = 0, y = 1; x < 1;) {
+ var v5_c = x;
+ (function() { return x + y + v5_c});
+ (() => x + y);
+ }
+
+ while (1 === 1) {
+ const x = 1, y = 1;
+ var v6_c = x;
+ (function() { return x + y + v6_c});
+ (() => x + y);
+ }
+
+ do {
+ const x = 1, y = 1;
+ var v7_c = x;
+ (function() { return x + y + v7_c});
+ (() => x + y);
+ } while (1 === 1)
+
+ for (const y = 0; y < 1;) {
+ const x = 1;
+ var v8_c = x;
+ (function() { return x + y + v8_c});
+ (() => x + y);
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/capturedLetConstInLoop4.types b/tests/baselines/reference/capturedLetConstInLoop4.types
index 000da5af1d3ea..2eb4d11566f45 100644
--- a/tests/baselines/reference/capturedLetConstInLoop4.types
+++ b/tests/baselines/reference/capturedLetConstInLoop4.types
@@ -26,30 +26,38 @@ export function exportedFoo() {
>v0 + v00 : string
> : ^^^^^^
>v0 : any
+> : ^^^
>v00 : string
> : ^^^^^^
>v1 : number
> : ^^^^^^
>v2 : any
+> : ^^^
>v3 : any
+> : ^^^
>v4 : number
> : ^^^^^^
>v5 : number
> : ^^^^^^
>v6 : any
+> : ^^^
>v7 : any
+> : ^^^
>v8 : number
> : ^^^^^^
}
for (let x of []) {
>x : any
+> : ^^^
>[] : undefined[]
> : ^^^^^^^^^^^
var v0 = x;
>v0 : any
+> : ^^^
>x : any
+> : ^^^
(function() { return x + v0});
>(function() { return x + v0}) : () => any
@@ -57,8 +65,11 @@ for (let x of []) {
>function() { return x + v0} : () => any
> : ^^^^^^^^^
>x + v0 : any
+> : ^^^
>x : any
+> : ^^^
>v0 : any
+> : ^^^
(() => x);
>(() => x) : () => any
@@ -66,6 +77,7 @@ for (let x of []) {
>() => x : () => any
> : ^^^^^^^^^
>x : any
+> : ^^^
}
for (let x in []) {
@@ -154,10 +166,13 @@ while (1 === 1) {
let x;
>x : any
+> : ^^^
var v2 = x;
>v2 : any
+> : ^^^
>x : any
+> : ^^^
(function() { return x + v2});
>(function() { return x + v2}) : () => any
@@ -165,8 +180,11 @@ while (1 === 1) {
>function() { return x + v2} : () => any
> : ^^^^^^^^^
>x + v2 : any
+> : ^^^
>x : any
+> : ^^^
>v2 : any
+> : ^^^
(() => x);
>(() => x) : () => any
@@ -174,15 +192,19 @@ while (1 === 1) {
>() => x : () => any
> : ^^^^^^^^^
>x : any
+> : ^^^
}
do {
let x;
>x : any
+> : ^^^
var v3 = x;
>v3 : any
+> : ^^^
>x : any
+> : ^^^
(function() { return x + v3});
>(function() { return x + v3}) : () => any
@@ -190,8 +212,11 @@ do {
>function() { return x + v3} : () => any
> : ^^^^^^^^^
>x + v3 : any
+> : ^^^
>x : any
+> : ^^^
>v3 : any
+> : ^^^
(() => x);
>(() => x) : () => any
@@ -199,6 +224,7 @@ do {
>() => x : () => any
> : ^^^^^^^^^
>x : any
+> : ^^^
} while (1 === 1)
>1 === 1 : boolean
@@ -322,11 +348,15 @@ while (1 === 1) {
let x, y;
>x : any
+> : ^^^
>y : any
+> : ^^^
var v6 = x;
>v6 : any
+> : ^^^
>x : any
+> : ^^^
(function() { return x + y + v6});
>(function() { return x + y + v6}) : () => any
@@ -334,10 +364,15 @@ while (1 === 1) {
>function() { return x + y + v6} : () => any
> : ^^^^^^^^^
>x + y + v6 : any
+> : ^^^
>x + y : any
+> : ^^^
>x : any
+> : ^^^
>y : any
+> : ^^^
>v6 : any
+> : ^^^
(() => x + y);
>(() => x + y) : () => any
@@ -345,18 +380,25 @@ while (1 === 1) {
>() => x + y : () => any
> : ^^^^^^^^^
>x + y : any
+> : ^^^
>x : any
+> : ^^^
>y : any
+> : ^^^
}
do {
let x, y;
>x : any
+> : ^^^
>y : any
+> : ^^^
var v7 = x;
>v7 : any
+> : ^^^
>x : any
+> : ^^^
(function() { return x + y + v7});
>(function() { return x + y + v7}) : () => any
@@ -364,10 +406,15 @@ do {
>function() { return x + y + v7} : () => any
> : ^^^^^^^^^
>x + y + v7 : any
+> : ^^^
>x + y : any
+> : ^^^
>x : any
+> : ^^^
>y : any
+> : ^^^
>v7 : any
+> : ^^^
(() => x + y);
>(() => x + y) : () => any
@@ -375,8 +422,11 @@ do {
>() => x + y : () => any
> : ^^^^^^^^^
>x + y : any
+> : ^^^
>x : any
+> : ^^^
>y : any
+> : ^^^
} while (1 === 1)
>1 === 1 : boolean
@@ -468,6 +518,7 @@ export function exportedFoo2() {
>v0_c + v00_c : string
> : ^^^^^^
>v0_c : any
+> : ^^^
>v00_c : string
> : ^^^^^^
>v1_c : number
@@ -490,12 +541,15 @@ export function exportedFoo2() {
for (const x of []) {
>x : any
+> : ^^^
>[] : undefined[]
> : ^^^^^^^^^^^
var v0_c = x;
>v0_c : any
+> : ^^^
>x : any
+> : ^^^
(function() { return x + v0_c});
>(function() { return x + v0_c}) : () => any
@@ -503,8 +557,11 @@ for (const x of []) {
>function() { return x + v0_c} : () => any
> : ^^^^^^^^^
>x + v0_c : any
+> : ^^^
>x : any
+> : ^^^
>v0_c : any
+> : ^^^
(() => x);
>(() => x) : () => any
@@ -512,6 +569,7 @@ for (const x of []) {
>() => x : () => any
> : ^^^^^^^^^
>x : any
+> : ^^^
}
for (const x in []) {
diff --git a/tests/baselines/reference/classStaticBlock24(module=amd).errors.txt b/tests/baselines/reference/classStaticBlock24(module=amd).errors.txt
new file mode 100644
index 0000000000000..a775df1810045
--- /dev/null
+++ b/tests/baselines/reference/classStaticBlock24(module=amd).errors.txt
@@ -0,0 +1,12 @@
+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.
+==== classStaticBlock24.ts (0 errors) ====
+ export class C {
+ static x: number;
+ static {
+ C.x = 1;
+ }
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/classStaticBlock24(module=system).errors.txt b/tests/baselines/reference/classStaticBlock24(module=system).errors.txt
new file mode 100644
index 0000000000000..6b5f7f745665d
--- /dev/null
+++ b/tests/baselines/reference/classStaticBlock24(module=system).errors.txt
@@ -0,0 +1,12 @@
+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.
+==== classStaticBlock24.ts (0 errors) ====
+ export class C {
+ static x: number;
+ static {
+ C.x = 1;
+ }
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/classStaticBlock24(module=umd).errors.txt b/tests/baselines/reference/classStaticBlock24(module=umd).errors.txt
new file mode 100644
index 0000000000000..b26e6adcd95cf
--- /dev/null
+++ b/tests/baselines/reference/classStaticBlock24(module=umd).errors.txt
@@ -0,0 +1,12 @@
+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.
+==== classStaticBlock24.ts (0 errors) ====
+ export class C {
+ static x: number;
+ static {
+ C.x = 1;
+ }
+ }
+
\ No newline at end of file
diff --git a/tests/baselines/reference/collisionExportsRequireAndAlias.errors.txt b/tests/baselines/reference/collisionExportsRequireAndAlias.errors.txt
index 14abebcb75fcd..8a030e687c10d 100644
--- a/tests/baselines/reference/collisionExportsRequireAndAlias.errors.txt
+++ b/tests/baselines/reference/collisionExportsRequireAndAlias.errors.txt
@@ -3,10 +3,10 @@ collisionExportsRequireAndAlias_file2.ts(2,8): error TS2441: Duplicate identifie
==== collisionExportsRequireAndAlias_file2.ts (2 errors) ====
- import require = require('collisionExportsRequireAndAlias_file1'); // Error
+ import require = require('./collisionExportsRequireAndAlias_file1'); // Error
~~~~~~~
!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
- import exports = require('collisionExportsRequireAndAlias_file3333'); // Error
+ import exports = require('./collisionExportsRequireAndAlias_file3333'); // Error
~~~~~~~
!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
export function foo() {
diff --git a/tests/baselines/reference/collisionExportsRequireAndAlias.js b/tests/baselines/reference/collisionExportsRequireAndAlias.js
index 68c8ae98fb99c..df3f4a3cb36f0 100644
--- a/tests/baselines/reference/collisionExportsRequireAndAlias.js
+++ b/tests/baselines/reference/collisionExportsRequireAndAlias.js
@@ -8,8 +8,8 @@ export function bar() {
export function bar2() {
}
//// [collisionExportsRequireAndAlias_file2.ts]
-import require = require('collisionExportsRequireAndAlias_file1'); // Error
-import exports = require('collisionExportsRequireAndAlias_file3333'); // Error
+import require = require('./collisionExportsRequireAndAlias_file1'); // Error
+import exports = require('./collisionExportsRequireAndAlias_file3333'); // Error
export function foo() {
require.bar();
}
@@ -18,31 +18,27 @@ export function foo2() {
}
//// [collisionExportsRequireAndAlias_file1.js]
-define(["require", "exports"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.bar = bar;
- function bar() {
- }
-});
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.bar = bar;
+function bar() {
+}
//// [collisionExportsRequireAndAlias_file3333.js]
-define(["require", "exports"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.bar2 = bar2;
- function bar2() {
- }
-});
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.bar2 = bar2;
+function bar2() {
+}
//// [collisionExportsRequireAndAlias_file2.js]
-define(["require", "exports", "collisionExportsRequireAndAlias_file1", "collisionExportsRequireAndAlias_file3333"], function (require, exports, require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.foo = foo;
- exports.foo2 = foo2;
- function foo() {
- require.bar();
- }
- function foo2() {
- exports.bar2();
- }
-});
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.foo = foo;
+exports.foo2 = foo2;
+var require = require("./collisionExportsRequireAndAlias_file1"); // Error
+var exports = require("./collisionExportsRequireAndAlias_file3333"); // Error
+function foo() {
+ require.bar();
+}
+function foo2() {
+ exports.bar2();
+}
diff --git a/tests/baselines/reference/collisionExportsRequireAndAlias.symbols b/tests/baselines/reference/collisionExportsRequireAndAlias.symbols
index 8b85320e2c981..471d8d7742dd7 100644
--- a/tests/baselines/reference/collisionExportsRequireAndAlias.symbols
+++ b/tests/baselines/reference/collisionExportsRequireAndAlias.symbols
@@ -1,14 +1,14 @@
//// [tests/cases/compiler/collisionExportsRequireAndAlias.ts] ////
=== collisionExportsRequireAndAlias_file2.ts ===
-import require = require('collisionExportsRequireAndAlias_file1'); // Error
+import require = require('./collisionExportsRequireAndAlias_file1'); // Error
>require : Symbol(require, Decl(collisionExportsRequireAndAlias_file2.ts, 0, 0))
-import exports = require('collisionExportsRequireAndAlias_file3333'); // Error
->exports : Symbol(exports, Decl(collisionExportsRequireAndAlias_file2.ts, 0, 66))
+import exports = require('./collisionExportsRequireAndAlias_file3333'); // Error
+>exports : Symbol(exports, Decl(collisionExportsRequireAndAlias_file2.ts, 0, 68))
export function foo() {
->foo : Symbol(foo, Decl(collisionExportsRequireAndAlias_file2.ts, 1, 69))
+>foo : Symbol(foo, Decl(collisionExportsRequireAndAlias_file2.ts, 1, 71))
require.bar();
>require.bar : Symbol(require.bar, Decl(collisionExportsRequireAndAlias_file1.ts, 0, 0))
@@ -20,7 +20,7 @@ export function foo2() {
exports.bar2();
>exports.bar2 : Symbol(exports.bar2, Decl(collisionExportsRequireAndAlias_file3333.ts, 0, 0))
->exports : Symbol(exports, Decl(collisionExportsRequireAndAlias_file2.ts, 0, 66))
+>exports : Symbol(exports, Decl(collisionExportsRequireAndAlias_file2.ts, 0, 68))
>bar2 : Symbol(exports.bar2, Decl(collisionExportsRequireAndAlias_file3333.ts, 0, 0))
}
=== collisionExportsRequireAndAlias_file1.ts ===
diff --git a/tests/baselines/reference/collisionExportsRequireAndAlias.types b/tests/baselines/reference/collisionExportsRequireAndAlias.types
index fae7e43435e2d..39d242dc75f75 100644
--- a/tests/baselines/reference/collisionExportsRequireAndAlias.types
+++ b/tests/baselines/reference/collisionExportsRequireAndAlias.types
@@ -1,11 +1,11 @@
//// [tests/cases/compiler/collisionExportsRequireAndAlias.ts] ////
=== collisionExportsRequireAndAlias_file2.ts ===
-import require = require('collisionExportsRequireAndAlias_file1'); // Error
+import require = require('./collisionExportsRequireAndAlias_file1'); // Error
>require : typeof require
> : ^^^^^^^^^^^^^^
-import exports = require('collisionExportsRequireAndAlias_file3333'); // Error
+import exports = require('./collisionExportsRequireAndAlias_file3333'); // Error
>exports : typeof exports
> : ^^^^^^^^^^^^^^
diff --git a/tests/baselines/reference/collisionExportsRequireAndAmbientClass.js b/tests/baselines/reference/collisionExportsRequireAndAmbientClass.js
index 2a83fcf37857e..0cb05d30de00f 100644
--- a/tests/baselines/reference/collisionExportsRequireAndAmbientClass.js
+++ b/tests/baselines/reference/collisionExportsRequireAndAmbientClass.js
@@ -38,13 +38,11 @@ namespace m4 {
}
//// [collisionExportsRequireAndAmbientClass_externalmodule.js]
-define(["require", "exports"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- var m2;
- (function (m2) {
- })(m2 || (m2 = {}));
-});
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var m2;
+(function (m2) {
+})(m2 || (m2 = {}));
//// [collisionExportsRequireAndAmbientClass_globalFile.js]
var m4;
(function (m4) {
diff --git a/tests/baselines/reference/collisionExportsRequireAndAmbientEnum.js b/tests/baselines/reference/collisionExportsRequireAndAmbientEnum.js
index 8a28a23366296..b079a99993eae 100644
--- a/tests/baselines/reference/collisionExportsRequireAndAmbientEnum.js
+++ b/tests/baselines/reference/collisionExportsRequireAndAmbientEnum.js
@@ -61,13 +61,11 @@ namespace m4 {
}
//// [collisionExportsRequireAndAmbientEnum_externalmodule.js]
-define(["require", "exports"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- var m2;
- (function (m2) {
- })(m2 || (m2 = {}));
-});
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var m2;
+(function (m2) {
+})(m2 || (m2 = {}));
//// [collisionExportsRequireAndAmbientEnum_globalFile.js]
var m4;
(function (m4) {
diff --git a/tests/baselines/reference/collisionExportsRequireAndAmbientFunction.js b/tests/baselines/reference/collisionExportsRequireAndAmbientFunction.js
index b8e48cae79845..adacc64d19b9e 100644
--- a/tests/baselines/reference/collisionExportsRequireAndAmbientFunction.js
+++ b/tests/baselines/reference/collisionExportsRequireAndAmbientFunction.js
@@ -16,11 +16,9 @@ namespace m2 {
}
//// [collisionExportsRequireAndAmbientFunction.js]
-define(["require", "exports"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- var m2;
- (function (m2) {
- var a = 10;
- })(m2 || (m2 = {}));
-});
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var m2;
+(function (m2) {
+ var a = 10;
+})(m2 || (m2 = {}));
diff --git a/tests/baselines/reference/collisionExportsRequireAndAmbientModule.js b/tests/baselines/reference/collisionExportsRequireAndAmbientModule.js
index 3680fe8caf028..ef3e16eeca09a 100644
--- a/tests/baselines/reference/collisionExportsRequireAndAmbientModule.js
+++ b/tests/baselines/reference/collisionExportsRequireAndAmbientModule.js
@@ -95,22 +95,20 @@ namespace m4 {
//// [collisionExportsRequireAndAmbientModule_externalmodule.js]
-define(["require", "exports"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.foo = foo;
- exports.foo2 = foo2;
- function foo() {
- return null;
- }
- function foo2() {
- return null;
- }
- var m2;
- (function (m2) {
- var a = 10;
- })(m2 || (m2 = {}));
-});
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.foo = foo;
+exports.foo2 = foo2;
+function foo() {
+ return null;
+}
+function foo2() {
+ return null;
+}
+var m2;
+(function (m2) {
+ var a = 10;
+})(m2 || (m2 = {}));
//// [collisionExportsRequireAndAmbientModule_globalFile.js]
var m4;
(function (m4) {
diff --git a/tests/baselines/reference/collisionExportsRequireAndAmbientVar.js b/tests/baselines/reference/collisionExportsRequireAndAmbientVar.js
index cd31c9d2a3547..273cee0d2e37e 100644
--- a/tests/baselines/reference/collisionExportsRequireAndAmbientVar.js
+++ b/tests/baselines/reference/collisionExportsRequireAndAmbientVar.js
@@ -27,14 +27,12 @@ namespace m4 {
}
//// [collisionExportsRequireAndAmbientVar_externalmodule.js]
-define(["require", "exports"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- var m2;
- (function (m2) {
- var a = 10;
- })(m2 || (m2 = {}));
-});
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var m2;
+(function (m2) {
+ var a = 10;
+})(m2 || (m2 = {}));
//// [collisionExportsRequireAndAmbientVar_globalFile.js]
var m4;
(function (m4) {
diff --git a/tests/baselines/reference/collisionExportsRequireAndClass.errors.txt b/tests/baselines/reference/collisionExportsRequireAndClass.errors.txt
index a2635142096ff..4166e3d8a6835 100644
--- a/tests/baselines/reference/collisionExportsRequireAndClass.errors.txt
+++ b/tests/baselines/reference/collisionExportsRequireAndClass.errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
collisionExportsRequireAndClass_externalmodule.ts(1,14): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
collisionExportsRequireAndClass_externalmodule.ts(3,14): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
+!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== collisionExportsRequireAndClass_externalmodule.ts (2 errors) ====
export class require {
~~~~~~~
diff --git a/tests/baselines/reference/collisionExportsRequireAndEnum.errors.txt b/tests/baselines/reference/collisionExportsRequireAndEnum.errors.txt
index c929a282c8d49..26bcf5ab58f4f 100644
--- a/tests/baselines/reference/collisionExportsRequireAndEnum.errors.txt
+++ b/tests/baselines/reference/collisionExportsRequireAndEnum.errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
collisionExportsRequireAndEnum_externalmodule.ts(1,13): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
collisionExportsRequireAndEnum_externalmodule.ts(5,13): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
+!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== collisionExportsRequireAndEnum_externalmodule.ts (2 errors) ====
export enum require { // Error
~~~~~~~
diff --git a/tests/baselines/reference/collisionExportsRequireAndFunction.errors.txt b/tests/baselines/reference/collisionExportsRequireAndFunction.errors.txt
index 414dfe834f90f..f1131515da2e0 100644
--- a/tests/baselines/reference/collisionExportsRequireAndFunction.errors.txt
+++ b/tests/baselines/reference/collisionExportsRequireAndFunction.errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
collisionExportsRequireAndFunction.ts(1,17): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
collisionExportsRequireAndFunction.ts(4,17): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
+!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== collisionExportsRequireAndFunction.ts (2 errors) ====
export function exports() {
~~~~~~~
diff --git a/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt b/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt
index 6eb1079637611..c46911ce9f906 100644
--- a/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt
+++ b/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
collisionExportsRequireAndInternalModuleAlias.ts(5,8): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
collisionExportsRequireAndInternalModuleAlias.ts(6,8): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
+!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== collisionExportsRequireAndInternalModuleAlias.ts (2 errors) ====
export namespace m {
export class c {
diff --git a/tests/baselines/reference/collisionExportsRequireAndModule.errors.txt b/tests/baselines/reference/collisionExportsRequireAndModule.errors.txt
index 8f0bad198b7f1..4047235cb1366 100644
--- a/tests/baselines/reference/collisionExportsRequireAndModule.errors.txt
+++ b/tests/baselines/reference/collisionExportsRequireAndModule.errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
collisionExportsRequireAndModule_externalmodule.ts(1,18): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
collisionExportsRequireAndModule_externalmodule.ts(10,18): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
+!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== collisionExportsRequireAndModule_externalmodule.ts (2 errors) ====
export namespace require {
~~~~~~~
diff --git a/tests/baselines/reference/collisionExportsRequireAndUninstantiatedModule.errors.txt b/tests/baselines/reference/collisionExportsRequireAndUninstantiatedModule.errors.txt
new file mode 100644
index 0000000000000..b74aa3662bb84
--- /dev/null
+++ b/tests/baselines/reference/collisionExportsRequireAndUninstantiatedModule.errors.txt
@@ -0,0 +1,19 @@
+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.
+==== collisionExportsRequireAndUninstantiatedModule.ts (0 errors) ====
+ export namespace require { // no error
+ export interface I {
+ }
+ }
+ export function foo(): require.I {
+ return null;
+ }
+ export namespace exports { // no error
+ export interface I {
+ }
+ }
+ export function foo2(): exports.I {
+ return null;
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/collisionExportsRequireAndVar.errors.txt b/tests/baselines/reference/collisionExportsRequireAndVar.errors.txt
index 5d6c84e914cdd..71df615719c91 100644
--- a/tests/baselines/reference/collisionExportsRequireAndVar.errors.txt
+++ b/tests/baselines/reference/collisionExportsRequireAndVar.errors.txt
@@ -1,7 +1,9 @@
+error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
collisionExportsRequireAndVar_externalmodule.ts(3,5): error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of a module.
collisionExportsRequireAndVar_externalmodule.ts(4,5): error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of a module.
+!!! error TS5107: Option 'module=AMD' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== collisionExportsRequireAndVar_externalmodule.ts (2 errors) ====
export function foo() {
}
diff --git a/tests/baselines/reference/commentOnImportStatement1.errors.txt b/tests/baselines/reference/commentOnImportStatement1.errors.txt
index 752db3d4fecc1..4e5cb3b10c562 100644
--- a/tests/baselines/reference/commentOnImportStatement1.errors.txt
+++ b/tests/baselines/reference/commentOnImportStatement1.errors.txt
@@ -1,4 +1,4 @@
-commentOnImportStatement1.ts(3,22): error TS2792: Cannot find module './foo'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
+commentOnImportStatement1.ts(3,22): error TS2307: Cannot find module './foo' or its corresponding type declarations.
==== commentOnImportStatement1.ts (1 errors) ====
@@ -6,5 +6,5 @@ commentOnImportStatement1.ts(3,22): error TS2792: Cannot find module './foo'. Di
import foo = require('./foo');
~~~~~~~
-!!! error TS2792: Cannot find module './foo'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
+!!! error TS2307: Cannot find module './foo' or its corresponding type declarations.
\ No newline at end of file
diff --git a/tests/baselines/reference/commentOnImportStatement1.js b/tests/baselines/reference/commentOnImportStatement1.js
index 3ff36c187a46c..93eb14b9a45b2 100644
--- a/tests/baselines/reference/commentOnImportStatement1.js
+++ b/tests/baselines/reference/commentOnImportStatement1.js
@@ -7,8 +7,6 @@ import foo = require('./foo');
//// [commentOnImportStatement1.js]
+"use strict";
/* Copyright */
-define(["require", "exports"], function (require, exports) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
-});
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/tests/baselines/reference/commentsBeforeVariableStatement1.errors.txt b/tests/baselines/reference/commentsBeforeVariableStatement1.errors.txt
new file mode 100644
index 0000000000000..39265bd0f71fa
--- /dev/null
+++ b/tests/baselines/reference/commentsBeforeVariableStatement1.errors.txt
@@ -0,0 +1,8 @@
+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.
+==== commentsBeforeVariableStatement1.ts (0 errors) ====
+ /** b's comment*/
+ export var b: number;
+
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsDottedModuleName.errors.txt b/tests/baselines/reference/commentsDottedModuleName.errors.txt
new file mode 100644
index 0000000000000..4893cf17c42f3
--- /dev/null
+++ b/tests/baselines/reference/commentsDottedModuleName.errors.txt
@@ -0,0 +1,11 @@
+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.
+==== commentsDottedModuleName.ts (0 errors) ====
+ /** this is multi declare module*/
+ export namespace outerModule.InnerModule {
+ /// class b comment
+ export class b {
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsExternalModules.errors.txt b/tests/baselines/reference/commentsExternalModules.errors.txt
new file mode 100644
index 0000000000000..1e2d583d84131
--- /dev/null
+++ b/tests/baselines/reference/commentsExternalModules.errors.txt
@@ -0,0 +1,63 @@
+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.
+==== commentsExternalModules_1.ts (0 errors) ====
+ /**This is on import declaration*/
+ import extMod = require("commentsExternalModules_0"); // trailing comment1
+ extMod.m1.fooExport();
+ var newVar = new extMod.m1.m2.c();
+ extMod.m4.fooExport();
+ var newVar2 = new extMod.m4.m2.c();
+
+==== commentsExternalModules_0.ts (0 errors) ====
+ /** Module comment*/
+ export namespace m1 {
+ /** b's comment*/
+ export var b: number;
+ /** foo's comment*/
+ function foo() {
+ return b;
+ }
+ /** m2 comments*/
+ export namespace m2 {
+ /** class comment;*/
+ export class c {
+ };
+ /** i*/
+ export var i = new c();
+ }
+ /** exported function*/
+ export function fooExport() {
+ return foo();
+ }
+ }
+ m1.fooExport();
+ var myvar = new m1.m2.c();
+
+ /** Module comment */
+ export namespace m4 {
+ /** b's comment */
+ export var b: number;
+ /** foo's comment
+ */
+ function foo() {
+ return b;
+ }
+ /** m2 comments
+ */
+ export namespace m2 {
+ /** class comment; */
+ export class c {
+ };
+ /** i */
+ export var i = new c();
+ }
+ /** exported function */
+ export function fooExport() {
+ return foo();
+ }
+ }
+ m4.fooExport();
+ var myvar2 = new m4.m2.c();
+
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsExternalModules2.errors.txt b/tests/baselines/reference/commentsExternalModules2.errors.txt
new file mode 100644
index 0000000000000..859f2c1134ec3
--- /dev/null
+++ b/tests/baselines/reference/commentsExternalModules2.errors.txt
@@ -0,0 +1,63 @@
+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.
+==== commentsExternalModules_1.ts (0 errors) ====
+ /**This is on import declaration*/
+ import extMod = require("commentsExternalModules2_0"); // trailing comment 1
+ extMod.m1.fooExport();
+ export var newVar = new extMod.m1.m2.c();
+ extMod.m4.fooExport();
+ export var newVar2 = new extMod.m4.m2.c();
+
+==== commentsExternalModules2_0.ts (0 errors) ====
+ /** Module comment*/
+ export namespace m1 {
+ /** b's comment*/
+ export var b: number;
+ /** foo's comment*/
+ function foo() {
+ return b;
+ }
+ /** m2 comments*/
+ export namespace m2 {
+ /** class comment;*/
+ export class c {
+ };
+ /** i*/
+ export var i = new c();
+ }
+ /** exported function*/
+ export function fooExport() {
+ return foo();
+ }
+ }
+ m1.fooExport();
+ var myvar = new m1.m2.c();
+
+ /** Module comment */
+ export namespace m4 {
+ /** b's comment */
+ export var b: number;
+ /** foo's comment
+ */
+ function foo() {
+ return b;
+ }
+ /** m2 comments
+ */
+ export namespace m2 {
+ /** class comment; */
+ export class c {
+ };
+ /** i */
+ export var i = new c();
+ }
+ /** exported function */
+ export function fooExport() {
+ return foo();
+ }
+ }
+ m4.fooExport();
+ var myvar2 = new m4.m2.c();
+
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsMultiModuleMultiFile.errors.txt b/tests/baselines/reference/commentsMultiModuleMultiFile.errors.txt
new file mode 100644
index 0000000000000..7bba5d1ad20e3
--- /dev/null
+++ b/tests/baselines/reference/commentsMultiModuleMultiFile.errors.txt
@@ -0,0 +1,38 @@
+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.
+==== commentsMultiModuleMultiFile_1.ts (0 errors) ====
+ import m = require('commentsMultiModuleMultiFile_0');
+ /** this is multi module 3 comment*/
+ export namespace multiM {
+ /** class d comment*/
+ export class d {
+ }
+
+ /// class f comment
+ export class f {
+ }
+ }
+ new multiM.d();
+==== commentsMultiModuleMultiFile_0.ts (0 errors) ====
+ /** this is multi declare module*/
+ export namespace multiM {
+ /// class b comment
+ export class b {
+ }
+ }
+ /** thi is multi module 2*/
+ export namespace multiM {
+ /** class c comment*/
+ export class c {
+ }
+
+ // class e comment
+ export class e {
+ }
+ }
+
+ new multiM.b();
+ new multiM.c();
+
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=system,moduledetection=auto).errors.txt b/tests/baselines/reference/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=system,moduledetection=auto).errors.txt
new file mode 100644
index 0000000000000..0ab9bcb53b3e2
--- /dev/null
+++ b/tests/baselines/reference/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=system,moduledetection=auto).errors.txt
@@ -0,0 +1,25 @@
+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.
+==== commentsOnJSXExpressionsArePreserved.tsx (0 errors) ====
+ // file is intentionally not a module - this tests for a crash in the module/system transforms alongside the `react-jsx` and `react-jsxdev` outputs
+ namespace JSX {}
+ class Component {
+ render() {
+ return
+ {/* missing */}
+ {null/* preserved */}
+ {
+ // ??? 1
+ }
+ { // ??? 2
+ }
+ {// ??? 3
+ }
+ {
+ // ??? 4
+ /* ??? 5 */}
+
;
+ }
+ }
\ No newline at end of file
diff --git a/tests/baselines/reference/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=system,moduledetection=auto).types b/tests/baselines/reference/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=system,moduledetection=auto).types
index bdb53395ee523..f4ceb70601f1e 100644
--- a/tests/baselines/reference/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=system,moduledetection=auto).types
+++ b/tests/baselines/reference/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=system,moduledetection=auto).types
@@ -12,7 +12,8 @@ class Component {
> : ^^^^^^^^^
return