mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
16 lines
417 B
Plaintext
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'.
|
|
}
|
|
|