18 lines
422 B
Plaintext
18 lines
422 B
Plaintext
|
=== tests/cases/compiler/functionOverloads25.ts ===
|
||
|
function foo():string;
|
||
|
>foo : { (): string; (bar: string): number; }
|
||
|
|
||
|
function foo(bar:string):number;
|
||
|
>foo : { (): string; (bar: string): number; }
|
||
|
>bar : string
|
||
|
|
||
|
function foo(bar?:any):any{ return '' };
|
||
|
>foo : { (): string; (bar: string): number; }
|
||
|
>bar : any
|
||
|
|
||
|
var x = foo();
|
||
|
>x : string
|
||
|
>foo() : string
|
||
|
>foo : { (): string; (bar: string): number; }
|
||
|
|