20 lines
605 B
Plaintext
20 lines
605 B
Plaintext
=== tests/cases/compiler/functionOverloads21.ts ===
|
|
function foo(bar:{a:number;}[]);
|
|
>foo : { (bar: { a: number; }[]): any; (bar: { a: number; b: string; }[]): any; }
|
|
>bar : { a: number; }[]
|
|
>a : number
|
|
|
|
function foo(bar:{a:number; b:string;}[]);
|
|
>foo : { (bar: { a: number; }[]): any; (bar: { a: number; b: string; }[]): any; }
|
|
>bar : { a: number; b: string; }[]
|
|
>a : number
|
|
>b : string
|
|
|
|
function foo(bar:{a:any; b?:string;}[]) { return 0 }
|
|
>foo : { (bar: { a: number; }[]): any; (bar: { a: number; b: string; }[]): any; }
|
|
>bar : { a: any; b?: string; }[]
|
|
>a : any
|
|
>b : string
|
|
>0 : 0
|
|
|