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