File tree Expand file tree Collapse file tree 3 files changed +61
-2
lines changed
cases/conformance/es6/modules Expand file tree Collapse file tree 3 files changed +61
-2
lines changed Original file line number Diff line number Diff line change
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
+
Original file line number Diff line number Diff line change 1
- //// [exportBinding.ts]
1
+ //// [tests/cases/conformance/es6/modules/exportBinding.ts] ////
2
+
3
+ //// [exportConsts.ts]
2
4
export { x }
5
+ export { x as xx }
6
+ export default x ;
7
+
3
8
const x = 'x'
4
9
5
10
export { Y as Z }
6
11
class Y { }
7
12
13
+ //// [exportVars.ts]
14
+ export { y }
15
+ export { y as yy }
16
+ export default y ;
17
+ var y = 'y'
18
+
8
19
9
- //// [exportBinding .js]
20
+ //// [exportConsts .js]
10
21
"use strict" ;
11
22
exports . __esModule = true ;
23
+ exports [ "default" ] = x ;
12
24
var x = 'x' ;
13
25
exports . x = x ;
26
+ exports . xx = x ;
14
27
var Y = ( function ( ) {
15
28
function Y ( ) {
16
29
}
17
30
return Y ;
18
31
} ( ) ) ;
19
32
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 ;
Original file line number Diff line number Diff line change
1
+ // @filename : exportConsts.ts
2
+ // @strict : true
1
3
export { x }
4
+ export { x as xx }
5
+ export default x ;
6
+
2
7
const x = 'x'
3
8
4
9
export { Y as Z }
5
10
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'
You can’t perform that action at this time.
0 commit comments