21 lines
554 B
Text
21 lines
554 B
Text
=== tests/cases/compiler/functionOverloads32.ts ===
|
|
function foo(bar:string):string;
|
|
>foo : { (bar: string): string; (bar: number): number; }
|
|
>bar : string
|
|
|
|
function foo(bar:number):number;
|
|
>foo : { (bar: string): string; (bar: number): number; }
|
|
>bar : number
|
|
|
|
function foo(bar:any):any{ return bar }
|
|
>foo : { (bar: string): string; (bar: number): number; }
|
|
>bar : any
|
|
>bar : any
|
|
|
|
var baz:number; var x = foo(baz);
|
|
>baz : number
|
|
>x : number
|
|
>foo(baz) : number
|
|
>foo : { (bar: string): string; (bar: number): number; }
|
|
>baz : number
|
|
|