Files
tsgo/testdata/baselines/reference/submodule/compiler/assignToFn.errors.txt

16 lines
417 B
Plaintext

assignToFn.ts(8,5): error TS2322: Type 'string' is not assignable to type '(n: number) => boolean'.
==== assignToFn.ts (1 errors) ====
namespace M {
interface I {
f(n:number):boolean;
}
var x:I={ f:function(n) { return true; } };
x.f="hello";
~~~
!!! error TS2322: Type 'string' is not assignable to type '(n: number) => boolean'.
}