2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/noImplicitAnyFunctions.ts(2,1): error TS7010: 'f1', which lacks return-type annotation, implicitly has an 'any' return type.
|
|
|
|
tests/cases/compiler/noImplicitAnyFunctions.ts(6,13): error TS7006: Parameter 'x' implicitly has an 'any' type.
|
|
|
|
tests/cases/compiler/noImplicitAnyFunctions.ts(17,1): error TS7010: 'f6', which lacks return-type annotation, implicitly has an 'any' return type.
|
|
|
|
tests/cases/compiler/noImplicitAnyFunctions.ts(19,1): error TS7010: 'f6', which lacks return-type annotation, implicitly has an 'any' return type.
|
|
|
|
tests/cases/compiler/noImplicitAnyFunctions.ts(19,24): error TS7006: Parameter 'y' implicitly has an 'any' type.
|
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/noImplicitAnyFunctions.ts (5 errors) ====
|
|
|
|
|
|
|
|
declare function f1();
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS7010: 'f1', which lacks return-type annotation, implicitly has an 'any' return type.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
declare function f2(): any;
|
|
|
|
|
|
|
|
function f3(x) {
|
|
|
|
~
|
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
|
|
|
}
|
|
|
|
|
|
|
|
function f4(x: any) {
|
|
|
|
return x;
|
|
|
|
}
|
|
|
|
|
|
|
|
function f5(x: any): any {
|
|
|
|
return x;
|
|
|
|
}
|
|
|
|
|
|
|
|
function f6(x: string, y: number);
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS7010: 'f6', which lacks return-type annotation, implicitly has an 'any' return type.
|
2014-07-13 01:04:16 +02:00
|
|
|
function f6(x: string, y: string): any;
|
|
|
|
function f6(x: string, y) {
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS7006: Parameter 'y' implicitly has an 'any' type.
|
2014-07-13 01:04:16 +02:00
|
|
|
return null;
|
|
|
|
~~~~~~~~~~~~~~~~
|
|
|
|
}
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS7010: 'f6', which lacks return-type annotation, implicitly has an 'any' return type.
|