TypeScript/tests/baselines/reference/functionOverloads2.errors.txt
2014-09-12 13:35:07 -07:00

10 lines
478 B
Plaintext

tests/cases/compiler/functionOverloads2.ts(4,13): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'number'.
==== 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);
~~~~
!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'number'.