TypeScript/tests/baselines/reference/assignToFn.errors.txt
2014-09-11 16:11:08 -07:00

13 lines
330 B
Plaintext

==== tests/cases/compiler/assignToFn.ts (1 errors) ====
module M {
interface I {
f(n:number):boolean;
}
var x:I={ f:function(n) { return true; } };
x.f="hello";
~~~
!!! error TS2323: Type 'string' is not assignable to type '(n: number) => boolean'.
}