2014-07-13 01:04:16 +02:00
|
|
|
//// [overloadModifiersMustAgree.ts]
|
|
|
|
class baz {
|
|
|
|
public foo();
|
|
|
|
private foo(bar?: any) { } // error - access modifiers do not agree
|
|
|
|
}
|
|
|
|
|
|
|
|
declare function bar();
|
|
|
|
export function bar(s: string);
|
|
|
|
function bar(s?: string) { }
|
|
|
|
|
|
|
|
interface I {
|
|
|
|
foo? ();
|
|
|
|
foo(s: string);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//// [overloadModifiersMustAgree.js]
|
|
|
|
var baz = (function () {
|
|
|
|
function baz() {
|
|
|
|
}
|
2015-02-07 03:45:09 +01:00
|
|
|
baz.prototype.foo = function (bar) { }; // error - access modifiers do not agree
|
2014-07-13 01:04:16 +02:00
|
|
|
return baz;
|
|
|
|
})();
|
2015-02-07 03:45:09 +01:00
|
|
|
function bar(s) { }
|