5 lines
414 B
Plaintext
5 lines
414 B
Plaintext
==== tests/cases/compiler/contextualTyping41.ts (1 errors) ====
|
|
var foo = <{():number; (i:number):number; }> (function(){return "err";});
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2353: Neither type '() => string' nor type '{ (): number; (i: number): number; }' is assignable to the other:
|
|
!!! error TS2353: Type 'string' is not assignable to type 'number'. |