2014-07-13 01:04:16 +02:00
|
|
|
//// [callOverloads1.ts]
|
2014-10-01 02:15:18 +02:00
|
|
|
class Foo { // error
|
2014-07-13 01:04:16 +02:00
|
|
|
bar1() { /*WScript.Echo("bar1");*/ }
|
|
|
|
|
|
|
|
constructor(x: any) {
|
|
|
|
// WScript.Echo("Constructor function has executed");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function Foo(); // error
|
|
|
|
function F1(s:string);
|
|
|
|
function F1(a:any) { return a;}
|
|
|
|
|
|
|
|
var f1 = new Foo("hey");
|
|
|
|
|
|
|
|
|
|
|
|
f1.bar1();
|
|
|
|
Foo();
|
|
|
|
|
|
|
|
//// [callOverloads1.js]
|
|
|
|
var Foo = (function () {
|
|
|
|
function Foo(x) {
|
2014-08-22 02:17:32 +02:00
|
|
|
// WScript.Echo("Constructor function has executed");
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
Foo.prototype.bar1 = function () {
|
|
|
|
};
|
|
|
|
return Foo;
|
|
|
|
})();
|
|
|
|
function F1(a) {
|
|
|
|
return a;
|
|
|
|
}
|
|
|
|
var f1 = new Foo("hey");
|
|
|
|
f1.bar1();
|
|
|
|
Foo();
|