TypeScript/tests/baselines/reference/contextualTyping41.errors.txt
2015-11-05 15:45:12 -08:00

9 lines
608 B
Plaintext

tests/cases/compiler/contextualTyping41.ts(1,11): error TS2352: Type '() => string' cannot be converted to type '{ (): number; (i: number): number; }'.
Type 'string' is not comparable to type 'number'.
==== tests/cases/compiler/contextualTyping41.ts (1 errors) ====
var foo = <{():number; (i:number):number; }> (function(){return "err";});
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2352: Type '() => string' cannot be converted to type '{ (): number; (i: number): number; }'.
!!! error TS2352: Type 'string' is not comparable to type 'number'.