20 lines
700 B
Text
20 lines
700 B
Text
=== tests/cases/compiler/functionOverloads15.ts ===
|
|
function foo(foo:{a:string; b:number;}):string;
|
|
>foo : { (foo: { a: string; b: number; }): string; (foo: { a: string; b: number; }): number; }
|
|
>foo : { a: string; b: number; }
|
|
>a : string
|
|
>b : number
|
|
|
|
function foo(foo:{a:string; b:number;}):number;
|
|
>foo : { (foo: { a: string; b: number; }): string; (foo: { a: string; b: number; }): number; }
|
|
>foo : { a: string; b: number; }
|
|
>a : string
|
|
>b : number
|
|
|
|
function foo(foo:{a:string; b?:number;}):any { return "" }
|
|
>foo : { (foo: { a: string; b: number; }): string; (foo: { a: string; b: number; }): number; }
|
|
>foo : { a: string; b?: number; }
|
|
>a : string
|
|
>b : number
|
|
>"" : string
|
|
|