2014-09-12 22:35:07 +02:00
tests/cases/compiler/noImplicitAnyModule.ts(5,9): error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type.
tests/cases/compiler/noImplicitAnyModule.ts(10,18): error TS7006: Parameter 'x' implicitly has an 'any' type.
tests/cases/compiler/noImplicitAnyModule.ts(11,9): error TS7010: 'g', which lacks return-type annotation, implicitly has an 'any' return type.
2015-03-05 03:15:55 +01:00
tests/cases/compiler/noImplicitAnyModule.ts(18,14): error TS7010: 'f', which lacks return-type annotation, implicitly has an 'any' return type.
2014-09-12 22:35:07 +02:00
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/noImplicitAnyModule.ts (4 errors) ====
declare module Module {
interface Interface {
// Should return error for implicit any on return type.
new ();
~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type.
2014-07-13 01:04:16 +02:00
}
class Class {
// Should return error for implicit `any` on parameter.
public f(x): any;
~
2014-09-12 00:19:57 +02:00
!!! error TS7006: Parameter 'x' implicitly has an 'any' type.
2014-07-13 01:04:16 +02:00
public g(x: any);
~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS7010: 'g', which lacks return-type annotation, implicitly has an 'any' return type.
2014-07-13 01:04:16 +02:00
// Should not return error at all.
private h(x);
}
// Should return error for implicit any on return type.
function f(x: number);
2015-03-05 03:15:55 +01:00
~
2014-09-12 00:19:57 +02:00
!!! error TS7010: 'f', which lacks return-type annotation, implicitly has an 'any' return type.
2014-07-13 01:04:16 +02:00
}