Skip to content

Commit 221c0f3

Browse files
committed
Update es5 module internal imports test and related baselines
1 parent 2cb7401 commit 221c0f3

6 files changed

+25
-17
lines changed

tests/baselines/reference/es5ModuleInternalNamedImports.errors.txt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ tests/cases/compiler/es5ModuleInternalNamedImports.ts(27,5): error TS1194: Expor
66
tests/cases/compiler/es5ModuleInternalNamedImports.ts(28,5): error TS1194: Export declarations are not permitted in a namespace.
77
tests/cases/compiler/es5ModuleInternalNamedImports.ts(29,5): error TS1194: Export declarations are not permitted in a namespace.
88
tests/cases/compiler/es5ModuleInternalNamedImports.ts(30,5): error TS1194: Export declarations are not permitted in a namespace.
9+
tests/cases/compiler/es5ModuleInternalNamedImports.ts(31,25): error TS1147: Import declarations in a namespace cannot reference a module.
10+
tests/cases/compiler/es5ModuleInternalNamedImports.ts(32,20): error TS1147: Import declarations in a namespace cannot reference a module.
11+
tests/cases/compiler/es5ModuleInternalNamedImports.ts(33,32): error TS1147: Import declarations in a namespace cannot reference a module.
12+
tests/cases/compiler/es5ModuleInternalNamedImports.ts(35,16): error TS2307: Cannot find module 'M3'.
913

1014

11-
==== tests/cases/compiler/es5ModuleInternalNamedImports.ts (8 errors) ====
15+
==== tests/cases/compiler/es5ModuleInternalNamedImports.ts (12 errors) ====
1216

1317
export module M {
1418
// variable
@@ -55,5 +59,17 @@ tests/cases/compiler/es5ModuleInternalNamedImports.ts(30,5): error TS1194: Expor
5559
export {M_A as a};
5660
~~~~~~~~~~~~~~~~~~
5761
!!! error TS1194: Export declarations are not permitted in a namespace.
62+
import * as M2 from "M2";
63+
~~~~
64+
!!! error TS1147: Import declarations in a namespace cannot reference a module.
65+
import M4 from "M4";
66+
~~~~
67+
!!! error TS1147: Import declarations in a namespace cannot reference a module.
68+
export import M5 = require("M5");
69+
~~~~
70+
!!! error TS1147: Import declarations in a namespace cannot reference a module.
5871
}
72+
import M3 from "M3";
73+
~~~~
74+
!!! error TS2307: Cannot find module 'M3'.
5975

tests/baselines/reference/es5ModuleInternalNamedImports.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ export module M {
2929
export {M_F as f};
3030
export {M_E as e};
3131
export {M_A as a};
32+
import * as M2 from "M2";
33+
import M4 from "M4";
34+
export import M5 = require("M5");
3235
}
36+
import M3 from "M3";
3337

3438

3539
//// [es5ModuleInternalNamedImports.js]
@@ -60,6 +64,5 @@ define(["require", "exports"], function (require, exports) {
6064
var M_E = M.M_E;
6165
// alias
6266
M.M_A = M_M;
63-
// Reexports
6467
})(M = exports.M || (exports.M = {}));
6568
});

tests/baselines/reference/es6ModuleInternalNamedImports.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,4 @@ export var M;
5555
var M_E = M.M_E;
5656
// alias
5757
M.M_A = M_M;
58-
// Reexports
59-
export { M_V as v };
60-
export { M_C as c };
61-
export { M_M as m };
62-
export { M_F as f };
63-
export { M_E as e };
64-
export { M_A as a };
6558
})(M || (M = {}));

tests/baselines/reference/es6ModuleInternalNamedImports2.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,4 @@ export var M;
5959
M.M_A = M_M;
6060
})(M || (M = {}));
6161
(function (M) {
62-
// Reexports
63-
export { M_V as v };
64-
export { M_C as c };
65-
export { M_M as m };
66-
export { M_F as f };
67-
export { M_E as e };
68-
export { M_A as a };
6962
})(M || (M = {}));

tests/baselines/reference/exportDeclarationInInternalModule.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ var Bbb;
5353
return SomeType;
5454
}());
5555
Bbb.SomeType = SomeType;
56-
// this line causes the nullref
5756
})(Bbb || (Bbb = {}));
5857
var a;
5958

tests/cases/compiler/es5ModuleInternalNamedImports.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,8 @@ export module M {
3030
export {M_F as f};
3131
export {M_E as e};
3232
export {M_A as a};
33+
import * as M2 from "M2";
34+
import M4 from "M4";
35+
export import M5 = require("M5");
3336
}
37+
import M3 from "M3";

0 commit comments

Comments
 (0)