File: commentsOverloads.js

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (382 lines) | stat: -rw-r--r-- 8,139 bytes parent folder | download | duplicates (2)
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
//// [commentsOverloads.ts]
/** this is signature 1*/
function f1(/**param a*/a: number): number;
function f1(b: string): number;
function f1(aOrb: any) {
    return 10;
}
f1("hello");
f1(10);
function f2(a: number): number;
/** this is signature 2*/
function f2(b: string): number;
/** this is f2 var comment*/
function f2(aOrb: any) {
    return 10;
}
f2("hello");
f2(10);
function f3(a: number): number;
function f3(b: string): number;
function f3(aOrb: any) {
    return 10;
}
f3("hello");
f3(10);
/** this is signature 4 - with number parameter*/
function f4(/**param a*/a: number): number;
/** this is signature 4 - with string parameter*/
function f4(b: string): number;
function f4(aOrb: any) {
    return 10;
}
f4("hello");
f4(10);
interface i1 {
    /**this signature 1*/
    (/**param a*/ a: number): number;
    /**this is signature 2*/
    (b: string): number;
    /** foo 1*/
    foo(a: number): number;
    /** foo 2*/
    foo(b: string): number;
    // foo 3
    foo(arr: number[]): number;
    /** foo 4 */
    foo(arr: string[]): number;

    foo2(a: number): number;
    /** foo2 2*/
    foo2(b: string): number;
    foo3(a: number): number;
    foo3(b: string): number;
    /** foo4 1*/
    foo4(a: number): number;
    foo4(b: string): number;
    /** foo4 any */
    foo4(c: any): any;
    /// new 1
    new (a: string);
    /** new 1*/
    new (b: number);
}
var i1_i: i1;
interface i2 {
    new (a: string);
    /** new 2*/
    new (b: number);
    (a: number): number;
    /**this is signature 2*/
    (b: string): number;
}
var i2_i: i2;
interface i3 {
    /** new 1*/
    new (a: string);
    /** new 2*/
    new (b: number);
    /**this is signature 1*/
    (a: number): number;
    (b: string): number;
}
var i3_i: i3;
interface i4 {
    new (a: string);
    new (b: number);
    (a: number): number;
    (b: string): number;
}
class c {
    public prop1(a: number): number;
    public prop1(b: string): number;
    public prop1(aorb: any) {
        return 10;
    }
    /** prop2 1*/
    public prop2(a: number): number;
    public prop2(b: string): number;
    public prop2(aorb: any) {
        return 10;
    }
    public prop3(a: number): number;
    /** prop3 2*/
    public prop3(b: string): number;
    public prop3(aorb: any) {
        return 10;
    }
    /** prop4 1*/
    public prop4(a: number): number;
    /** prop4 2*/
    public prop4(b: string): number;
    public prop4(aorb: any) {
        return 10;
    }
    /** prop5 1*/
    public prop5(a: number): number;
    /** prop5 2*/
    public prop5(b: string): number;
    /** Prop5 implementaion*/
    public prop5(aorb: any) {
        return 10;
    }
}
class c1 {
    constructor(a: number);
    constructor(b: string);
    constructor(aorb: any) {
    }
}
class c2 {
    /** c2 1*/
    constructor(a: number);
    // c2 2
    constructor(b: string);
    constructor(aorb: any) {
    }
}
class c3 {
    constructor(a: number);
    /** c3 2*/
    constructor(b: string);
    constructor(aorb: any) {
    }
}
class c4 {
    /** c4 1*/
    constructor(a: number);
    /** c4 2*/
    constructor(b: string);
    /** c4 3 */
    constructor(aorb: any) {
    }
}
class c5 {
    /** c5 1*/
    constructor(a: number);
    /** c5 2*/
    constructor(b: string);
    /** c5 implementation*/
    constructor(aorb: any) {
    }
}
var c_i = new c();

var c1_i_1 = new c1(10);
var c1_i_2 = new c1("hello");
var c2_i_1 = new c2(10);
var c2_i_2 = new c2("hello");
var c3_i_1 = new c3(10);
var c3_i_2 = new c3("hello");
var c4_i_1 = new c4(10);
var c4_i_2 = new c4("hello");
var c5_i_1 = new c5(10);
var c5_i_2 = new c5("hello");


//// [commentsOverloads.js]
function f1(aOrb) {
    return 10;
}
f1("hello");
f1(10);
/** this is f2 var comment*/
function f2(aOrb) {
    return 10;
}
f2("hello");
f2(10);
function f3(aOrb) {
    return 10;
}
f3("hello");
f3(10);
function f4(aOrb) {
    return 10;
}
f4("hello");
f4(10);
var i1_i;
var i2_i;
var i3_i;
var c = (function () {
    function c() {
    }
    c.prototype.prop1 = function (aorb) {
        return 10;
    };
    c.prototype.prop2 = function (aorb) {
        return 10;
    };
    c.prototype.prop3 = function (aorb) {
        return 10;
    };
    c.prototype.prop4 = function (aorb) {
        return 10;
    };
    /** Prop5 implementaion*/
    c.prototype.prop5 = function (aorb) {
        return 10;
    };
    return c;
}());
var c1 = (function () {
    function c1(aorb) {
    }
    return c1;
}());
var c2 = (function () {
    function c2(aorb) {
    }
    return c2;
}());
var c3 = (function () {
    function c3(aorb) {
    }
    return c3;
}());
var c4 = (function () {
    /** c4 3 */
    function c4(aorb) {
    }
    return c4;
}());
var c5 = (function () {
    /** c5 implementation*/
    function c5(aorb) {
    }
    return c5;
}());
var c_i = new c();
var c1_i_1 = new c1(10);
var c1_i_2 = new c1("hello");
var c2_i_1 = new c2(10);
var c2_i_2 = new c2("hello");
var c3_i_1 = new c3(10);
var c3_i_2 = new c3("hello");
var c4_i_1 = new c4(10);
var c4_i_2 = new c4("hello");
var c5_i_1 = new c5(10);
var c5_i_2 = new c5("hello");


//// [commentsOverloads.d.ts]
/** this is signature 1*/
declare function f1(/**param a*/ a: number): number;
declare function f1(b: string): number;
declare function f2(a: number): number;
/** this is signature 2*/
declare function f2(b: string): number;
declare function f3(a: number): number;
declare function f3(b: string): number;
/** this is signature 4 - with number parameter*/
declare function f4(/**param a*/ a: number): number;
/** this is signature 4 - with string parameter*/
declare function f4(b: string): number;
interface i1 {
    /**this signature 1*/
    (/**param a*/ a: number): number;
    /**this is signature 2*/
    (b: string): number;
    /** foo 1*/
    foo(a: number): number;
    /** foo 2*/
    foo(b: string): number;
    foo(arr: number[]): number;
    /** foo 4 */
    foo(arr: string[]): number;
    foo2(a: number): number;
    /** foo2 2*/
    foo2(b: string): number;
    foo3(a: number): number;
    foo3(b: string): number;
    /** foo4 1*/
    foo4(a: number): number;
    foo4(b: string): number;
    /** foo4 any */
    foo4(c: any): any;
    new (a: string): any;
    /** new 1*/
    new (b: number): any;
}
declare var i1_i: i1;
interface i2 {
    new (a: string): any;
    /** new 2*/
    new (b: number): any;
    (a: number): number;
    /**this is signature 2*/
    (b: string): number;
}
declare var i2_i: i2;
interface i3 {
    /** new 1*/
    new (a: string): any;
    /** new 2*/
    new (b: number): any;
    /**this is signature 1*/
    (a: number): number;
    (b: string): number;
}
declare var i3_i: i3;
interface i4 {
    new (a: string): any;
    new (b: number): any;
    (a: number): number;
    (b: string): number;
}
declare class c {
    prop1(a: number): number;
    prop1(b: string): number;
    /** prop2 1*/
    prop2(a: number): number;
    prop2(b: string): number;
    prop3(a: number): number;
    /** prop3 2*/
    prop3(b: string): number;
    /** prop4 1*/
    prop4(a: number): number;
    /** prop4 2*/
    prop4(b: string): number;
    /** prop5 1*/
    prop5(a: number): number;
    /** prop5 2*/
    prop5(b: string): number;
}
declare class c1 {
    constructor(a: number);
    constructor(b: string);
}
declare class c2 {
    /** c2 1*/
    constructor(a: number);
    constructor(b: string);
}
declare class c3 {
    constructor(a: number);
    /** c3 2*/
    constructor(b: string);
}
declare class c4 {
    /** c4 1*/
    constructor(a: number);
    /** c4 2*/
    constructor(b: string);
}
declare class c5 {
    /** c5 1*/
    constructor(a: number);
    /** c5 2*/
    constructor(b: string);
}
declare var c_i: c;
declare var c1_i_1: c1;
declare var c1_i_2: c1;
declare var c2_i_1: c2;
declare var c2_i_2: c2;
declare var c3_i_1: c3;
declare var c3_i_2: c3;
declare var c4_i_1: c4;
declare var c4_i_2: c4;
declare var c5_i_1: c5;
declare var c5_i_2: c5;