TypeScript/tests/baselines/reference/overloadModifiersMustAgree.errors.txt
2014-07-24 17:03:33 -07:00

26 lines
787 B
Plaintext

==== tests/cases/compiler/overloadModifiersMustAgree.ts (5 errors) ====
class baz {
public foo();
~~~
!!! Overload signatures must all be public or private.
private foo(bar?: any) { } // error - access modifiers do not agree
}
declare function bar();
~~~
!!! Overload signatures must all be ambient or non-ambient.
export function bar(s: string);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! Function implementation expected.
~~~
!!! Overload signatures must all be exported or not exported.
function bar(s?: string) { }
interface I {
foo? ();
foo(s: string);
~~~
!!! Overload signatures must all be optional or required.
}