17 lines
638 B
Plaintext
17 lines
638 B
Plaintext
==== tests/cases/compiler/noImplicitAnyFunctionExpressionAssignment.ts (2 errors) ====
|
|
|
|
var x: (a: any) => void = function <T>(x: T) {
|
|
~~~~~~~~~~~~~~~~~~~~
|
|
return null;
|
|
~~~~~~~~~~~~~~~~
|
|
};
|
|
~
|
|
!!! error TS7011: 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;
|
|
~~~~~~~~~~~~~~~~
|
|
};
|
|
~
|
|
!!! error TS7010: 'f', which lacks return-type annotation, implicitly has an 'any' return type. |