TypeScript/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt

14 lines
489 B
Text
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== 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.