17 lines
No EOL
610 B
Text
17 lines
No EOL
610 B
Text
==== tests/cases/compiler/noImplicitAnyFunctionExpressionAssignment.ts (2 errors) ====
|
|
|
|
var x: (a: any) => void = function <T>(x: T) {
|
|
~~~~~~~~~~~~~~~~~~~~
|
|
return null;
|
|
~~~~~~~~~~~~~~~~
|
|
};
|
|
~
|
|
!!! Function expression, which lacks return-type annotation, implicitly has an 'any' return type.
|
|
|
|
var x2: (a: any) => void = function f<T>(x: T) {
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
return null;
|
|
~~~~~~~~~~~~~~~~
|
|
};
|
|
~
|
|
!!! 'f', which lacks return-type annotation, implicitly has an 'any' return type. |