14 lines
489 B
Text
14 lines
489 B
Text
|
==== tests/cases/compiler/assignLambdaToNominalSubtypeOfFunction.ts (2 errors) ====
|
||
|
interface IResultCallback extends Function {
|
||
|
x: number;
|
||
|
}
|
||
|
|
||
|
function fn(cb: IResultCallback) { }
|
||
|
|
||
|
fn((a, b) => true);
|
||
|
~~~~~~~~~~~~~~~~~~
|
||
|
!!! Supplied parameters do not match any signature of call target.
|
||
|
fn(function (a, b) { return true; })
|
||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
|
!!! Supplied parameters do not match any signature of call target.
|
||
|
|