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
|
// @target: ES5
// @declaration: true
// @removeComments: false
/** 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");
|