TypeScript/tests/baselines/reference/assignToFn.errors.txt
2016-09-01 14:25:44 -07:00

16 lines
458 B
Plaintext

tests/cases/compiler/assignToFn.ts(8,5): error TS2322: Type '"hello"' is not assignable to type '(n: number) => boolean'.
==== 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 TS2322: Type '"hello"' is not assignable to type '(n: number) => boolean'.
}