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

46 lines
1.6 KiB
Plaintext

==== tests/cases/compiler/implicitAnyAmbients.ts (9 errors) ====
declare module m {
var x; // error
~
!!! error TS7005: Variable 'x' implicitly has an 'any' type.
var y: any;
function f(x); // error
~~~~~~~~~~~~~~
!!! error TS7010: 'f', which lacks return-type annotation, implicitly has an 'any' return type.
~
!!! error TS7006: Parameter 'x' implicitly has an 'any' type.
function f2(x: any); // error
~~~~~~~~~~~~~~~~~~~~
!!! error TS7010: 'f2', which lacks return-type annotation, implicitly has an 'any' return type.
function f3(x: any): any;
interface I {
foo(); // error
~~~~~~
!!! error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type.
foo2(x: any); // error
~~~~~~~~~~~~~
!!! error TS7010: 'foo2', which lacks return-type annotation, implicitly has an 'any' return type.
foo3(x: any): any;
}
class C {
foo(); // error
~~~~~~
!!! error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type.
foo2(x: any); // error
~~~~~~~~~~~~~
!!! error TS7010: 'foo2', which lacks return-type annotation, implicitly has an 'any' return type.
foo3(x: any): any;
}
module n {
var y; // error
~
!!! error TS7005: Variable 'y' implicitly has an 'any' type.
}
import m2 = n;
}