1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
|
=== tests/cases/compiler/commentsModules.ts ===
/** Module comment*/
module m1 {
>m1 : Symbol(m1, Decl(commentsModules.ts, 0, 0))
/** b's comment*/
export var b: number;
>b : Symbol(b, Decl(commentsModules.ts, 3, 14))
/** foo's comment*/
function foo() {
>foo : Symbol(foo, Decl(commentsModules.ts, 3, 25))
return b;
>b : Symbol(b, Decl(commentsModules.ts, 3, 14))
}
/** m2 comments*/
export module m2 {
>m2 : Symbol(m2, Decl(commentsModules.ts, 7, 5))
/** class comment;*/
export class c {
>c : Symbol(c, Decl(commentsModules.ts, 9, 22))
};
/** i*/
export var i = new c();
>i : Symbol(i, Decl(commentsModules.ts, 14, 18))
>c : Symbol(c, Decl(commentsModules.ts, 9, 22))
}
/** exported function*/
export function fooExport() {
>fooExport : Symbol(fooExport, Decl(commentsModules.ts, 15, 5))
return foo();
>foo : Symbol(foo, Decl(commentsModules.ts, 3, 25))
}
// shouldn't appear
export function foo2Export(/**hm*/ a: string) {
>foo2Export : Symbol(foo2Export, Decl(commentsModules.ts, 19, 5))
>a : Symbol(a, Decl(commentsModules.ts, 22, 31))
}
/** foo3Export
* comment
*/
export function foo3Export() {
>foo3Export : Symbol(foo3Export, Decl(commentsModules.ts, 23, 5))
}
/** foo4Export
* comment
*/
function foo4Export() {
>foo4Export : Symbol(foo4Export, Decl(commentsModules.ts, 29, 5))
}
} // trailing comment module
m1.fooExport();
>m1.fooExport : Symbol(m1.fooExport, Decl(commentsModules.ts, 15, 5))
>m1 : Symbol(m1, Decl(commentsModules.ts, 0, 0))
>fooExport : Symbol(m1.fooExport, Decl(commentsModules.ts, 15, 5))
var myvar = new m1.m2.c();
>myvar : Symbol(myvar, Decl(commentsModules.ts, 38, 3))
>m1.m2.c : Symbol(m1.m2.c, Decl(commentsModules.ts, 9, 22))
>m1.m2 : Symbol(m1.m2, Decl(commentsModules.ts, 7, 5))
>m1 : Symbol(m1, Decl(commentsModules.ts, 0, 0))
>m2 : Symbol(m1.m2, Decl(commentsModules.ts, 7, 5))
>c : Symbol(m1.m2.c, Decl(commentsModules.ts, 9, 22))
/** module comment of m2.m3*/
module m2.m3 {
>m2 : Symbol(m2, Decl(commentsModules.ts, 38, 26))
>m3 : Symbol(m3, Decl(commentsModules.ts, 40, 10))
/** Exported class comment*/
export class c {
>c : Symbol(c, Decl(commentsModules.ts, 40, 14))
}
} /* trailing dotted module comment*/
new m2.m3.c();
>m2.m3.c : Symbol(m2.m3.c, Decl(commentsModules.ts, 40, 14))
>m2.m3 : Symbol(m2.m3, Decl(commentsModules.ts, 40, 10))
>m2 : Symbol(m2, Decl(commentsModules.ts, 38, 26))
>m3 : Symbol(m2.m3, Decl(commentsModules.ts, 40, 10))
>c : Symbol(m2.m3.c, Decl(commentsModules.ts, 40, 14))
/** module comment of m3.m4.m5*/
module m3.m4.m5 {
>m3 : Symbol(m3, Decl(commentsModules.ts, 45, 14))
>m4 : Symbol(m4, Decl(commentsModules.ts, 47, 10))
>m5 : Symbol(m5, Decl(commentsModules.ts, 47, 13))
/** Exported class comment*/
export class c {
>c : Symbol(c, Decl(commentsModules.ts, 47, 17))
}
} // trailing dotted module 2
new m3.m4.m5.c();
>m3.m4.m5.c : Symbol(m3.m4.m5.c, Decl(commentsModules.ts, 47, 17))
>m3.m4.m5 : Symbol(m3.m4.m5, Decl(commentsModules.ts, 47, 13))
>m3.m4 : Symbol(m3.m4, Decl(commentsModules.ts, 47, 10))
>m3 : Symbol(m3, Decl(commentsModules.ts, 45, 14))
>m4 : Symbol(m3.m4, Decl(commentsModules.ts, 47, 10))
>m5 : Symbol(m3.m4.m5, Decl(commentsModules.ts, 47, 13))
>c : Symbol(m3.m4.m5.c, Decl(commentsModules.ts, 47, 17))
/** module comment of m4.m5.m6*/
module m4.m5.m6 {
>m4 : Symbol(m4, Decl(commentsModules.ts, 52, 17))
>m5 : Symbol(m5, Decl(commentsModules.ts, 54, 10))
>m6 : Symbol(m6, Decl(commentsModules.ts, 54, 13))
export module m7 {
>m7 : Symbol(m7, Decl(commentsModules.ts, 54, 17))
/** Exported class comment*/
export class c {
>c : Symbol(c, Decl(commentsModules.ts, 55, 22))
}
} /* trailing inner module */ /* multiple comments*/
}
new m4.m5.m6.m7.c();
>m4.m5.m6.m7.c : Symbol(m4.m5.m6.m7.c, Decl(commentsModules.ts, 55, 22))
>m4.m5.m6.m7 : Symbol(m4.m5.m6.m7, Decl(commentsModules.ts, 54, 17))
>m4.m5.m6 : Symbol(m4.m5.m6, Decl(commentsModules.ts, 54, 13))
>m4.m5 : Symbol(m4.m5, Decl(commentsModules.ts, 54, 10))
>m4 : Symbol(m4, Decl(commentsModules.ts, 52, 17))
>m5 : Symbol(m4.m5, Decl(commentsModules.ts, 54, 10))
>m6 : Symbol(m4.m5.m6, Decl(commentsModules.ts, 54, 13))
>m7 : Symbol(m4.m5.m6.m7, Decl(commentsModules.ts, 54, 17))
>c : Symbol(m4.m5.m6.m7.c, Decl(commentsModules.ts, 55, 22))
/** module comment of m5.m6.m7*/
module m5.m6.m7 {
>m5 : Symbol(m5, Decl(commentsModules.ts, 61, 20))
>m6 : Symbol(m6, Decl(commentsModules.ts, 63, 10))
>m7 : Symbol(m7, Decl(commentsModules.ts, 63, 13))
/** module m8 comment*/
export module m8 {
>m8 : Symbol(m8, Decl(commentsModules.ts, 63, 17))
/** Exported class comment*/
export class c {
>c : Symbol(c, Decl(commentsModules.ts, 65, 22))
}
}
}
new m5.m6.m7.m8.c();
>m5.m6.m7.m8.c : Symbol(m5.m6.m7.m8.c, Decl(commentsModules.ts, 65, 22))
>m5.m6.m7.m8 : Symbol(m5.m6.m7.m8, Decl(commentsModules.ts, 63, 17))
>m5.m6.m7 : Symbol(m5.m6.m7, Decl(commentsModules.ts, 63, 13))
>m5.m6 : Symbol(m5.m6, Decl(commentsModules.ts, 63, 10))
>m5 : Symbol(m5, Decl(commentsModules.ts, 61, 20))
>m6 : Symbol(m5.m6, Decl(commentsModules.ts, 63, 10))
>m7 : Symbol(m5.m6.m7, Decl(commentsModules.ts, 63, 13))
>m8 : Symbol(m5.m6.m7.m8, Decl(commentsModules.ts, 63, 17))
>c : Symbol(m5.m6.m7.m8.c, Decl(commentsModules.ts, 65, 22))
module m6.m7 {
>m6 : Symbol(m6, Decl(commentsModules.ts, 71, 20))
>m7 : Symbol(m7, Decl(commentsModules.ts, 72, 10))
export module m8 {
>m8 : Symbol(m8, Decl(commentsModules.ts, 72, 14))
/** Exported class comment*/
export class c {
>c : Symbol(c, Decl(commentsModules.ts, 73, 22))
}
}
}
new m6.m7.m8.c();
>m6.m7.m8.c : Symbol(m6.m7.m8.c, Decl(commentsModules.ts, 73, 22))
>m6.m7.m8 : Symbol(m6.m7.m8, Decl(commentsModules.ts, 72, 14))
>m6.m7 : Symbol(m6.m7, Decl(commentsModules.ts, 72, 10))
>m6 : Symbol(m6, Decl(commentsModules.ts, 71, 20))
>m7 : Symbol(m6.m7, Decl(commentsModules.ts, 72, 10))
>m8 : Symbol(m6.m7.m8, Decl(commentsModules.ts, 72, 14))
>c : Symbol(m6.m7.m8.c, Decl(commentsModules.ts, 73, 22))
module m7.m8 {
>m7 : Symbol(m7, Decl(commentsModules.ts, 79, 17))
>m8 : Symbol(m8, Decl(commentsModules.ts, 80, 10))
/** module m9 comment*/
export module m9 {
>m9 : Symbol(m9, Decl(commentsModules.ts, 80, 14))
/** Exported class comment*/
export class c {
>c : Symbol(c, Decl(commentsModules.ts, 82, 22))
}
/** class d */
class d {
>d : Symbol(d, Decl(commentsModules.ts, 85, 9))
}
// class e
export class e {
>e : Symbol(e, Decl(commentsModules.ts, 89, 9))
}
}
}
new m7.m8.m9.c();
>m7.m8.m9.c : Symbol(m7.m8.m9.c, Decl(commentsModules.ts, 82, 22))
>m7.m8.m9 : Symbol(m7.m8.m9, Decl(commentsModules.ts, 80, 14))
>m7.m8 : Symbol(m7.m8, Decl(commentsModules.ts, 80, 10))
>m7 : Symbol(m7, Decl(commentsModules.ts, 79, 17))
>m8 : Symbol(m7.m8, Decl(commentsModules.ts, 80, 10))
>m9 : Symbol(m7.m8.m9, Decl(commentsModules.ts, 80, 14))
>c : Symbol(m7.m8.m9.c, Decl(commentsModules.ts, 82, 22))
|