9 lines
608 B
Plaintext
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'. |