10 lines
No EOL
658 B
Text
10 lines
No EOL
658 B
Text
tests/cases/compiler/overloadResolutionOverCTLambda.ts(2,5): error TS2345: Argument of type '(a: number) => number' is not assignable to parameter of type '(item: number) => boolean'.
|
|
Type 'number' is not assignable to type 'boolean'.
|
|
|
|
|
|
==== tests/cases/compiler/overloadResolutionOverCTLambda.ts (1 errors) ====
|
|
function foo(b: (item: number) => boolean) { }
|
|
foo(a => a); // can not convert (number)=>bool to (number)=>number
|
|
~~~~~~
|
|
!!! error TS2345: Argument of type '(a: number) => number' is not assignable to parameter of type '(item: number) => boolean'.
|
|
!!! error TS2345: Type 'number' is not assignable to type 'boolean'. |