21 lines
528 B
Plaintext
21 lines
528 B
Plaintext
=== tests/cases/compiler/functionOverloads30.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 x = foo('bar');
|
|
>x : string
|
|
>foo('bar') : string
|
|
>foo : { (bar: string): string; (bar: number): number; }
|
|
>'bar' : "bar"
|
|
|