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

17 lines
817 B
Plaintext

functionOverloads41.ts(4,14): error TS2769: No overload matches this call.
The last overload gave the following error.
Property 'a' is missing in type '{}' but required in type '{ a: boolean; }'.
==== functionOverloads41.ts (1 errors) ====
function foo(bar:{a:number;}[]):string;
function foo(bar:{a:boolean;}[]):number;
function foo(bar:{a:any;}[]):any{ return bar }
var x = foo([{}]);
~~
!!! error TS2769: No overload matches this call.
!!! error TS2769: The last overload gave the following error.
!!! error TS2769: Property 'a' is missing in type '{}' but required in type '{ a: boolean; }'.
!!! related TS2728 functionOverloads41.ts:2:19: 'a' is declared here.
!!! related TS2771 functionOverloads41.ts:2:10: The last overload is declared here.