7 lines
No EOL
319 B
Text
7 lines
No EOL
319 B
Text
==== tests/cases/compiler/functionOverloads2.ts (1 errors) ====
|
|
function foo(bar: string): string;
|
|
function foo(bar: number): number;
|
|
function foo(bar: any): any { return bar };
|
|
var x = foo(true);
|
|
~~~~
|
|
!!! Argument of type 'boolean' is not assignable to parameter of type 'number'. |