19 lines
597 B
Text
19 lines
597 B
Text
|
=== 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
|
||
|
|