Skip to content

Commit 9c2a74c

Browse files
committed
Update tests
1 parent d08960f commit 9c2a74c

File tree

3 files changed

+61
-2
lines changed

3 files changed

+61
-2
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
tests/cases/conformance/es6/modules/exportConsts.ts(3,16): error TS2448: Block-scoped variable 'x' used before its declaration.
2+
tests/cases/conformance/es6/modules/exportConsts.ts(3,16): error TS2454: Variable 'x' is used before being assigned.
3+
tests/cases/conformance/es6/modules/exportVars.ts(3,16): error TS2454: Variable 'y' is used before being assigned.
4+
5+
6+
==== tests/cases/conformance/es6/modules/exportConsts.ts (2 errors) ====
7+
export { x }
8+
export { x as xx }
9+
export default x;
10+
~
11+
!!! error TS2448: Block-scoped variable 'x' used before its declaration.
12+
~
13+
!!! error TS2454: Variable 'x' is used before being assigned.
14+
15+
const x = 'x'
16+
17+
export { Y as Z }
18+
class Y {}
19+
20+
==== tests/cases/conformance/es6/modules/exportVars.ts (1 errors) ====
21+
export { y }
22+
export { y as yy }
23+
export default y;
24+
~
25+
!!! error TS2454: Variable 'y' is used before being assigned.
26+
var y = 'y'
27+
Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,39 @@
1-
//// [exportBinding.ts]
1+
//// [tests/cases/conformance/es6/modules/exportBinding.ts] ////
2+
3+
//// [exportConsts.ts]
24
export { x }
5+
export { x as xx }
6+
export default x;
7+
38
const x = 'x'
49

510
export { Y as Z }
611
class Y {}
712

13+
//// [exportVars.ts]
14+
export { y }
15+
export { y as yy }
16+
export default y;
17+
var y = 'y'
18+
819

9-
//// [exportBinding.js]
20+
//// [exportConsts.js]
1021
"use strict";
1122
exports.__esModule = true;
23+
exports["default"] = x;
1224
var x = 'x';
1325
exports.x = x;
26+
exports.xx = x;
1427
var Y = (function () {
1528
function Y() {
1629
}
1730
return Y;
1831
}());
1932
exports.Z = Y;
33+
//// [exportVars.js]
34+
"use strict";
35+
exports.__esModule = true;
36+
exports["default"] = y;
37+
var y = 'y';
38+
exports.y = y;
39+
exports.yy = y;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
1+
// @filename: exportConsts.ts
2+
// @strict: true
13
export { x }
4+
export { x as xx }
5+
export default x;
6+
27
const x = 'x'
38

49
export { Y as Z }
510
class Y {}
11+
12+
// @filename: exportVars.ts
13+
// @strict: true
14+
export { y }
15+
export { y as yy }
16+
export default y;
17+
var y = 'y'

0 commit comments

Comments
 (0)