mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
9 lines
630 B
Plaintext
9 lines
630 B
Plaintext
contextualTyping33.ts(1,90): error TS2322: Type '() => string' is not assignable to type '{ (): number; (i: number): number; }'.
|
|
Type 'string' is not assignable to type 'number'.
|
|
|
|
|
|
==== contextualTyping33.ts (1 errors) ====
|
|
function foo(param: {():number; (i:number):number; }[]) { }; foo([function(){return 1;}, function(){return "foo"}]);
|
|
~~~~~~~~
|
|
!!! error TS2322: Type '() => string' is not assignable to type '{ (): number; (i: number): number; }'.
|
|
!!! error TS2322: Type 'string' is not assignable to type 'number'. |