2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/functionOverloads21.ts ===
|
|
|
|
function foo(bar:{a:number;}[]);
|
2015-04-13 23:01:57 +02:00
|
|
|
>foo : { (bar: { a: number; }[]): any; (bar: { a: number; b: string; }[]): any; }, Symbol(foo, Decl(functionOverloads21.ts, 0, 0), Decl(functionOverloads21.ts, 0, 32), Decl(functionOverloads21.ts, 1, 42))
|
|
|
|
>bar : { a: number; }[], Symbol(bar, Decl(functionOverloads21.ts, 0, 13))
|
|
|
|
>a : number, Symbol(a, Decl(functionOverloads21.ts, 0, 18))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
function foo(bar:{a:number; b:string;}[]);
|
2015-04-13 23:01:57 +02:00
|
|
|
>foo : { (bar: { a: number; }[]): any; (bar: { a: number; b: string; }[]): any; }, Symbol(foo, Decl(functionOverloads21.ts, 0, 0), Decl(functionOverloads21.ts, 0, 32), Decl(functionOverloads21.ts, 1, 42))
|
|
|
|
>bar : { a: number; b: string; }[], Symbol(bar, Decl(functionOverloads21.ts, 1, 13))
|
|
|
|
>a : number, Symbol(a, Decl(functionOverloads21.ts, 1, 18))
|
|
|
|
>b : string, Symbol(b, Decl(functionOverloads21.ts, 1, 27))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
function foo(bar:{a:any; b?:string;}[]) { return 0 }
|
2015-04-13 23:01:57 +02:00
|
|
|
>foo : { (bar: { a: number; }[]): any; (bar: { a: number; b: string; }[]): any; }, Symbol(foo, Decl(functionOverloads21.ts, 0, 0), Decl(functionOverloads21.ts, 0, 32), Decl(functionOverloads21.ts, 1, 42))
|
|
|
|
>bar : { a: any; b?: string; }[], Symbol(bar, Decl(functionOverloads21.ts, 2, 13))
|
|
|
|
>a : any, Symbol(a, Decl(functionOverloads21.ts, 2, 18))
|
|
|
|
>b : string, Symbol(b, Decl(functionOverloads21.ts, 2, 24))
|
2015-04-13 21:36:11 +02:00
|
|
|
>0 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|