TypeScript/tests/baselines/reference/overloadModifiersMustAgree.errors.txt
2014-09-11 16:11:08 -07:00

24 lines
767 B
Plaintext

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