2014-07-13 01:04:16 +02:00
|
|
|
//// [functionOverloads7.ts]
|
|
|
|
class foo {
|
|
|
|
private bar();
|
|
|
|
private bar(foo: string);
|
|
|
|
private bar(foo?: any){ return "foo" }
|
|
|
|
public n() {
|
|
|
|
var foo = this.bar();
|
|
|
|
foo = this.bar("test");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//// [functionOverloads7.js]
|
|
|
|
var foo = (function () {
|
|
|
|
function foo() {
|
|
|
|
}
|
2015-02-07 05:03:24 +01:00
|
|
|
foo.prototype.bar = function (foo) { return "foo"; };
|
2014-07-13 01:04:16 +02:00
|
|
|
foo.prototype.n = function () {
|
|
|
|
var foo = this.bar();
|
|
|
|
foo = this.bar("test");
|
|
|
|
};
|
|
|
|
return foo;
|
|
|
|
})();
|