Skip to content

Commit 720fae1

Browse files
committed
Test cases for trailing comments for modules
1 parent 4983252 commit 720fae1

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

tests/baselines/reference/commentsModules.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,30 +35,30 @@ module m1 {
3535
*/
3636
function foo4Export() {
3737
}
38-
}
38+
} // trailing comment module
3939
m1.fooExport();
4040
var myvar = new m1.m2.c();
4141
/** module comment of m2.m3*/
4242
module m2.m3 {
4343
/** Exported class comment*/
4444
export class c {
4545
}
46-
}
46+
} /* trailing dotted module comment*/
4747
new m2.m3.c();
4848
/** module comment of m3.m4.m5*/
4949
module m3.m4.m5 {
5050
/** Exported class comment*/
5151
export class c {
5252
}
53-
}
53+
} // trailing dotted module 2
5454
new m3.m4.m5.c();
5555
/** module comment of m4.m5.m6*/
5656
module m4.m5.m6 {
5757
export module m7 {
5858
/** Exported class comment*/
5959
export class c {
6060
}
61-
}
61+
} /* trailing inner module */ /* multiple comments*/
6262
}
6363
new m4.m5.m6.m7.c();
6464
/** module comment of m5.m6.m7*/
@@ -141,7 +141,7 @@ var m1;
141141
*/
142142
function foo4Export() {
143143
}
144-
})(m1 || (m1 = {}));
144+
})(m1 || (m1 = {})); // trailing comment module
145145
m1.fooExport();
146146
var myvar = new m1.m2.c();
147147
/** module comment of m2.m3*/
@@ -157,7 +157,7 @@ var m2;
157157
m3.c = c;
158158
})(m2.m3 || (m2.m3 = {}));
159159
var m3 = m2.m3;
160-
})(m2 || (m2 = {}));
160+
})(m2 || (m2 = {})); /* trailing dotted module comment*/
161161
new m2.m3.c();
162162
/** module comment of m3.m4.m5*/
163163
var m3;
@@ -175,7 +175,7 @@ var m3;
175175
var m5 = m4.m5;
176176
})(m3.m4 || (m3.m4 = {}));
177177
var m4 = m3.m4;
178-
})(m3 || (m3 = {}));
178+
})(m3 || (m3 = {})); // trailing dotted module 2
179179
new m3.m4.m5.c();
180180
/** module comment of m4.m5.m6*/
181181
var m4;
@@ -191,7 +191,7 @@ var m4;
191191
})();
192192
m7.c = c;
193193
})(m6.m7 || (m6.m7 = {}));
194-
var m7 = m6.m7;
194+
var m7 = m6.m7; /* trailing inner module */ /* multiple comments*/
195195
})(m5.m6 || (m5.m6 = {}));
196196
var m6 = m5.m6;
197197
})(m4.m5 || (m4.m5 = {}));

tests/cases/compiler/commentsModules.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,30 +37,30 @@ module m1 {
3737
*/
3838
function foo4Export() {
3939
}
40-
}
40+
} // trailing comment module
4141
m1.fooExport();
4242
var myvar = new m1.m2.c();
4343
/** module comment of m2.m3*/
4444
module m2.m3 {
4545
/** Exported class comment*/
4646
export class c {
4747
}
48-
}
48+
} /* trailing dotted module comment*/
4949
new m2.m3.c();
5050
/** module comment of m3.m4.m5*/
5151
module m3.m4.m5 {
5252
/** Exported class comment*/
5353
export class c {
5454
}
55-
}
55+
} // trailing dotted module 2
5656
new m3.m4.m5.c();
5757
/** module comment of m4.m5.m6*/
5858
module m4.m5.m6 {
5959
export module m7 {
6060
/** Exported class comment*/
6161
export class c {
6262
}
63-
}
63+
} /* trailing inner module */ /* multiple comments*/
6464
}
6565
new m4.m5.m6.m7.c();
6666
/** module comment of m5.m6.m7*/

0 commit comments

Comments
 (0)