TypeScript/tests/baselines/reference/noImplicitAnyForMethodParameters.errors.txt

23 lines
825 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/noImplicitAnyForMethodParameters.ts (4 errors) ====
declare class A {
private foo(a); // OK - ambient class and private method - no error
}
declare class B {
public foo(a); // OK - ambient class and public method - error
~~~~~~~~~~~~~~
!!! 'foo', which lacks return-type annotation, implicitly has an 'any' return type.
~
!!! Parameter 'a' implicitly has an 'any' type.
}
class C {
private foo(a) { } // OK - non-ambient class and private method - error
~
!!! Parameter 'a' implicitly has an 'any' type.
}
class D {
public foo(a) { } // OK - non-ambient class and public method - error
~
!!! Parameter 'a' implicitly has an 'any' type.
}