2014-11-05 21:26:03 +01:00
tests/cases/compiler/functionSignatureAssignmentCompat1.ts(10,5): error TS2322: Type '(delimiter?: string) => ParserFunc' is not assignable to type 'ParserFunc'.
2014-10-28 08:28:59 +01:00
Types of parameters 'delimiter' and 'eventEmitter' are incompatible.
2014-09-12 22:35:07 +02:00
Type 'string' is not assignable to type 'number'.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/functionSignatureAssignmentCompat1.ts (1 errors) ====
interface ParserFunc {
(eventEmitter: number, buffer: string): void;
}
interface Parsers {
raw: ParserFunc;
readline(delimiter?: string): ParserFunc;
}
var parsers: Parsers;
var c: ParserFunc = parsers.raw; // ok!
var d: ParserFunc = parsers.readline; // not ok
2014-07-19 02:30:06 +02:00
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '(delimiter?: string) => ParserFunc' is not assignable to type 'ParserFunc'.
!!! error TS2322: Types of parameters 'delimiter' and 'eventEmitter' are incompatible.
!!! error TS2322: Type 'string' is not assignable to type 'number'.
2014-07-13 01:04:16 +02:00
var e: ParserFunc = parsers.readline(); // ok