20 lines
486 B
Plaintext
20 lines
486 B
Plaintext
|
=== tests/cases/compiler/functionOverloads33.ts ===
|
||
|
function foo(bar:string):string;
|
||
|
>foo : { (bar: string): string; (bar: any): number; }
|
||
|
>bar : string
|
||
|
|
||
|
function foo(bar:any):number;
|
||
|
>foo : { (bar: string): string; (bar: any): number; }
|
||
|
>bar : any
|
||
|
|
||
|
function foo(bar:any):any{ return bar }
|
||
|
>foo : { (bar: string): string; (bar: any): number; }
|
||
|
>bar : any
|
||
|
>bar : any
|
||
|
|
||
|
var x = foo(5);
|
||
|
>x : number
|
||
|
>foo(5) : number
|
||
|
>foo : { (bar: string): string; (bar: any): number; }
|
||
|
|