2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/arrayBestCommonTypes.ts ===
|
2014-10-10 23:41:14 +02:00
|
|
|
module EmptyTypes {
|
2015-04-13 23:01:57 +02:00
|
|
|
>EmptyTypes : typeof EmptyTypes, Symbol(EmptyTypes, Decl(arrayBestCommonTypes.ts, 0, 0))
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
interface iface { }
|
2015-04-13 23:01:57 +02:00
|
|
|
>iface : iface, Symbol(iface, Decl(arrayBestCommonTypes.ts, 0, 19))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
class base implements iface { }
|
2015-04-13 23:01:57 +02:00
|
|
|
>base : base, Symbol(base, Decl(arrayBestCommonTypes.ts, 1, 23))
|
|
|
|
>iface : iface, Symbol(iface, Decl(arrayBestCommonTypes.ts, 0, 19))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
class base2 implements iface { }
|
2015-04-13 23:01:57 +02:00
|
|
|
>base2 : base2, Symbol(base2, Decl(arrayBestCommonTypes.ts, 2, 35))
|
|
|
|
>iface : iface, Symbol(iface, Decl(arrayBestCommonTypes.ts, 0, 19))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
class derived extends base { }
|
2015-04-13 23:01:57 +02:00
|
|
|
>derived : derived, Symbol(derived, Decl(arrayBestCommonTypes.ts, 3, 36))
|
|
|
|
>base : base, Symbol(base, Decl(arrayBestCommonTypes.ts, 1, 23))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
class f {
|
2015-04-13 23:01:57 +02:00
|
|
|
>f : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 4, 34))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
public voidIfAny(x: boolean, y?: boolean): number;
|
2015-04-13 23:01:57 +02:00
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
|
|
|
>x : boolean, Symbol(x, Decl(arrayBestCommonTypes.ts, 8, 25))
|
|
|
|
>y : boolean, Symbol(y, Decl(arrayBestCommonTypes.ts, 8, 36))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
public voidIfAny(x: string, y?: boolean): number;
|
2015-04-13 23:01:57 +02:00
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
|
|
|
>x : string, Symbol(x, Decl(arrayBestCommonTypes.ts, 9, 25))
|
|
|
|
>y : boolean, Symbol(y, Decl(arrayBestCommonTypes.ts, 9, 35))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
public voidIfAny(x: number, y?: boolean): number;
|
2015-04-13 23:01:57 +02:00
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
|
|
|
>x : number, Symbol(x, Decl(arrayBestCommonTypes.ts, 10, 25))
|
|
|
|
>y : boolean, Symbol(y, Decl(arrayBestCommonTypes.ts, 10, 35))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
public voidIfAny(x: any, y = false): any { return null; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
|
|
|
>x : any, Symbol(x, Decl(arrayBestCommonTypes.ts, 11, 25))
|
|
|
|
>y : boolean, Symbol(y, Decl(arrayBestCommonTypes.ts, 11, 32))
|
2015-04-13 21:36:11 +02:00
|
|
|
>false : boolean
|
|
|
|
>null : null
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
public x() {
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : () => void, Symbol(x, Decl(arrayBestCommonTypes.ts, 11, 65))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
<number>(this.voidIfAny([4, 2][0]));
|
2014-08-15 23:33:16 +02:00
|
|
|
><number>(this.voidIfAny([4, 2][0])) : number
|
|
|
|
>(this.voidIfAny([4, 2][0])) : number
|
|
|
|
>this.voidIfAny([4, 2][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 4, 34))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
2014-08-15 23:33:16 +02:00
|
|
|
>[4, 2][0] : number
|
|
|
|
>[4, 2] : number[]
|
2015-04-13 21:36:11 +02:00
|
|
|
>4 : number
|
|
|
|
>2 : number
|
|
|
|
>0 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
<number>(this.voidIfAny([4, 2, undefined][0]));
|
2014-08-15 23:33:16 +02:00
|
|
|
><number>(this.voidIfAny([4, 2, undefined][0])) : number
|
|
|
|
>(this.voidIfAny([4, 2, undefined][0])) : number
|
|
|
|
>this.voidIfAny([4, 2, undefined][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 4, 34))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
2014-08-15 23:33:16 +02:00
|
|
|
>[4, 2, undefined][0] : number
|
|
|
|
>[4, 2, undefined] : number[]
|
2015-04-13 21:36:11 +02:00
|
|
|
>4 : number
|
|
|
|
>2 : number
|
2015-04-13 22:54:22 +02:00
|
|
|
>undefined : undefined, Symbol(undefined)
|
2015-04-13 21:36:11 +02:00
|
|
|
>0 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
<number>(this.voidIfAny([undefined, 2, 4][0]));
|
2014-08-15 23:33:16 +02:00
|
|
|
><number>(this.voidIfAny([undefined, 2, 4][0])) : number
|
|
|
|
>(this.voidIfAny([undefined, 2, 4][0])) : number
|
|
|
|
>this.voidIfAny([undefined, 2, 4][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 4, 34))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
2014-08-15 23:33:16 +02:00
|
|
|
>[undefined, 2, 4][0] : number
|
|
|
|
>[undefined, 2, 4] : number[]
|
2015-04-13 22:54:22 +02:00
|
|
|
>undefined : undefined, Symbol(undefined)
|
2015-04-13 21:36:11 +02:00
|
|
|
>2 : number
|
|
|
|
>4 : number
|
|
|
|
>0 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
<number>(this.voidIfAny([null, 2, 4][0]));
|
2014-08-15 23:33:16 +02:00
|
|
|
><number>(this.voidIfAny([null, 2, 4][0])) : number
|
|
|
|
>(this.voidIfAny([null, 2, 4][0])) : number
|
|
|
|
>this.voidIfAny([null, 2, 4][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 4, 34))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
2014-08-15 23:33:16 +02:00
|
|
|
>[null, 2, 4][0] : number
|
|
|
|
>[null, 2, 4] : number[]
|
2015-04-13 21:36:11 +02:00
|
|
|
>null : null
|
|
|
|
>2 : number
|
|
|
|
>4 : number
|
|
|
|
>0 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
<number>(this.voidIfAny([2, 4, null][0]));
|
2014-08-15 23:33:16 +02:00
|
|
|
><number>(this.voidIfAny([2, 4, null][0])) : number
|
|
|
|
>(this.voidIfAny([2, 4, null][0])) : number
|
|
|
|
>this.voidIfAny([2, 4, null][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 4, 34))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
2014-08-15 23:33:16 +02:00
|
|
|
>[2, 4, null][0] : number
|
|
|
|
>[2, 4, null] : number[]
|
2015-04-13 21:36:11 +02:00
|
|
|
>2 : number
|
|
|
|
>4 : number
|
|
|
|
>null : null
|
|
|
|
>0 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
<number>(this.voidIfAny([undefined, 4, null][0]));
|
2014-08-15 23:33:16 +02:00
|
|
|
><number>(this.voidIfAny([undefined, 4, null][0])) : number
|
|
|
|
>(this.voidIfAny([undefined, 4, null][0])) : number
|
|
|
|
>this.voidIfAny([undefined, 4, null][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 4, 34))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
2014-08-15 23:33:16 +02:00
|
|
|
>[undefined, 4, null][0] : number
|
|
|
|
>[undefined, 4, null] : number[]
|
2015-04-13 22:54:22 +02:00
|
|
|
>undefined : undefined, Symbol(undefined)
|
2015-04-13 21:36:11 +02:00
|
|
|
>4 : number
|
|
|
|
>null : null
|
|
|
|
>0 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
<number>(this.voidIfAny(['', "q"][0]));
|
2014-08-15 23:33:16 +02:00
|
|
|
><number>(this.voidIfAny(['', "q"][0])) : number
|
|
|
|
>(this.voidIfAny(['', "q"][0])) : number
|
|
|
|
>this.voidIfAny(['', "q"][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 4, 34))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
2014-08-15 23:33:16 +02:00
|
|
|
>['', "q"][0] : string
|
|
|
|
>['', "q"] : string[]
|
2015-04-13 21:36:11 +02:00
|
|
|
>'' : string
|
|
|
|
>"q" : string
|
|
|
|
>0 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
<number>(this.voidIfAny(['', "q", undefined][0]));
|
2014-08-15 23:33:16 +02:00
|
|
|
><number>(this.voidIfAny(['', "q", undefined][0])) : number
|
|
|
|
>(this.voidIfAny(['', "q", undefined][0])) : number
|
|
|
|
>this.voidIfAny(['', "q", undefined][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 4, 34))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
2014-08-15 23:33:16 +02:00
|
|
|
>['', "q", undefined][0] : string
|
|
|
|
>['', "q", undefined] : string[]
|
2015-04-13 21:36:11 +02:00
|
|
|
>'' : string
|
|
|
|
>"q" : string
|
2015-04-13 22:54:22 +02:00
|
|
|
>undefined : undefined, Symbol(undefined)
|
2015-04-13 21:36:11 +02:00
|
|
|
>0 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
<number>(this.voidIfAny([undefined, "q", ''][0]));
|
2014-08-15 23:33:16 +02:00
|
|
|
><number>(this.voidIfAny([undefined, "q", ''][0])) : number
|
|
|
|
>(this.voidIfAny([undefined, "q", ''][0])) : number
|
|
|
|
>this.voidIfAny([undefined, "q", ''][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 4, 34))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
2014-08-15 23:33:16 +02:00
|
|
|
>[undefined, "q", ''][0] : string
|
|
|
|
>[undefined, "q", ''] : string[]
|
2015-04-13 22:54:22 +02:00
|
|
|
>undefined : undefined, Symbol(undefined)
|
2015-04-13 21:36:11 +02:00
|
|
|
>"q" : string
|
|
|
|
>'' : string
|
|
|
|
>0 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
<number>(this.voidIfAny([null, "q", ''][0]));
|
2014-08-15 23:33:16 +02:00
|
|
|
><number>(this.voidIfAny([null, "q", ''][0])) : number
|
|
|
|
>(this.voidIfAny([null, "q", ''][0])) : number
|
|
|
|
>this.voidIfAny([null, "q", ''][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 4, 34))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
2014-08-15 23:33:16 +02:00
|
|
|
>[null, "q", ''][0] : string
|
|
|
|
>[null, "q", ''] : string[]
|
2015-04-13 21:36:11 +02:00
|
|
|
>null : null
|
|
|
|
>"q" : string
|
|
|
|
>'' : string
|
|
|
|
>0 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
<number>(this.voidIfAny(["q", '', null][0]));
|
2014-08-15 23:33:16 +02:00
|
|
|
><number>(this.voidIfAny(["q", '', null][0])) : number
|
|
|
|
>(this.voidIfAny(["q", '', null][0])) : number
|
|
|
|
>this.voidIfAny(["q", '', null][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 4, 34))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
2014-08-15 23:33:16 +02:00
|
|
|
>["q", '', null][0] : string
|
|
|
|
>["q", '', null] : string[]
|
2015-04-13 21:36:11 +02:00
|
|
|
>"q" : string
|
|
|
|
>'' : string
|
|
|
|
>null : null
|
|
|
|
>0 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
<number>(this.voidIfAny([undefined, '', null][0]));
|
2014-08-15 23:33:16 +02:00
|
|
|
><number>(this.voidIfAny([undefined, '', null][0])) : number
|
|
|
|
>(this.voidIfAny([undefined, '', null][0])) : number
|
|
|
|
>this.voidIfAny([undefined, '', null][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 4, 34))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
2014-08-15 23:33:16 +02:00
|
|
|
>[undefined, '', null][0] : string
|
|
|
|
>[undefined, '', null] : string[]
|
2015-04-13 22:54:22 +02:00
|
|
|
>undefined : undefined, Symbol(undefined)
|
2015-04-13 21:36:11 +02:00
|
|
|
>'' : string
|
|
|
|
>null : null
|
|
|
|
>0 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
<number>(this.voidIfAny([[3, 4], [null]][0][0]));
|
|
|
|
><number>(this.voidIfAny([[3, 4], [null]][0][0])) : number
|
|
|
|
>(this.voidIfAny([[3, 4], [null]][0][0])) : number
|
|
|
|
>this.voidIfAny([[3, 4], [null]][0][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 4, 34))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 7, 13), Decl(arrayBestCommonTypes.ts, 8, 58), Decl(arrayBestCommonTypes.ts, 9, 57), Decl(arrayBestCommonTypes.ts, 10, 57))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[[3, 4], [null]][0][0] : number
|
|
|
|
>[[3, 4], [null]][0] : number[]
|
|
|
|
>[[3, 4], [null]] : number[][]
|
|
|
|
>[3, 4] : number[]
|
2015-04-13 21:36:11 +02:00
|
|
|
>3 : number
|
|
|
|
>4 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
>[null] : null[]
|
2015-04-13 21:36:11 +02:00
|
|
|
>null : null
|
|
|
|
>0 : number
|
|
|
|
>0 : number
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
|
|
|
|
var t1: { x: number; y: base; }[] = [{ x: 7, y: new derived() }, { x: 5, y: new base() }];
|
2015-04-13 23:01:57 +02:00
|
|
|
>t1 : { x: number; y: base; }[], Symbol(t1, Decl(arrayBestCommonTypes.ts, 31, 15))
|
|
|
|
>x : number, Symbol(x, Decl(arrayBestCommonTypes.ts, 31, 21))
|
|
|
|
>y : base, Symbol(y, Decl(arrayBestCommonTypes.ts, 31, 32))
|
|
|
|
>base : base, Symbol(base, Decl(arrayBestCommonTypes.ts, 1, 23))
|
2014-10-13 15:56:58 +02:00
|
|
|
>[{ x: 7, y: new derived() }, { x: 5, y: new base() }] : { x: number; y: derived; }[]
|
2014-08-15 23:33:16 +02:00
|
|
|
>{ x: 7, y: new derived() } : { x: number; y: derived; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : number, Symbol(x, Decl(arrayBestCommonTypes.ts, 31, 50))
|
2015-04-13 21:36:11 +02:00
|
|
|
>7 : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : derived, Symbol(y, Decl(arrayBestCommonTypes.ts, 31, 56))
|
2014-08-15 23:33:16 +02:00
|
|
|
>new derived() : derived
|
2015-04-13 23:01:57 +02:00
|
|
|
>derived : typeof derived, Symbol(derived, Decl(arrayBestCommonTypes.ts, 3, 36))
|
2014-08-15 23:33:16 +02:00
|
|
|
>{ x: 5, y: new base() } : { x: number; y: base; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : number, Symbol(x, Decl(arrayBestCommonTypes.ts, 31, 78))
|
2015-04-13 21:36:11 +02:00
|
|
|
>5 : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : base, Symbol(y, Decl(arrayBestCommonTypes.ts, 31, 84))
|
2014-08-15 23:33:16 +02:00
|
|
|
>new base() : base
|
2015-04-13 23:01:57 +02:00
|
|
|
>base : typeof base, Symbol(base, Decl(arrayBestCommonTypes.ts, 1, 23))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
var t2: { x: boolean; y: base; }[] = [{ x: true, y: new derived() }, { x: false, y: new base() }];
|
2015-04-13 23:01:57 +02:00
|
|
|
>t2 : { x: boolean; y: base; }[], Symbol(t2, Decl(arrayBestCommonTypes.ts, 32, 15))
|
|
|
|
>x : boolean, Symbol(x, Decl(arrayBestCommonTypes.ts, 32, 21))
|
|
|
|
>y : base, Symbol(y, Decl(arrayBestCommonTypes.ts, 32, 33))
|
|
|
|
>base : base, Symbol(base, Decl(arrayBestCommonTypes.ts, 1, 23))
|
2014-10-13 15:56:58 +02:00
|
|
|
>[{ x: true, y: new derived() }, { x: false, y: new base() }] : { x: boolean; y: derived; }[]
|
2014-08-15 23:33:16 +02:00
|
|
|
>{ x: true, y: new derived() } : { x: boolean; y: derived; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : boolean, Symbol(x, Decl(arrayBestCommonTypes.ts, 32, 51))
|
2015-04-13 21:36:11 +02:00
|
|
|
>true : boolean
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : derived, Symbol(y, Decl(arrayBestCommonTypes.ts, 32, 60))
|
2014-08-15 23:33:16 +02:00
|
|
|
>new derived() : derived
|
2015-04-13 23:01:57 +02:00
|
|
|
>derived : typeof derived, Symbol(derived, Decl(arrayBestCommonTypes.ts, 3, 36))
|
2014-08-15 23:33:16 +02:00
|
|
|
>{ x: false, y: new base() } : { x: boolean; y: base; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : boolean, Symbol(x, Decl(arrayBestCommonTypes.ts, 32, 82))
|
2015-04-13 21:36:11 +02:00
|
|
|
>false : boolean
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : base, Symbol(y, Decl(arrayBestCommonTypes.ts, 32, 92))
|
2014-08-15 23:33:16 +02:00
|
|
|
>new base() : base
|
2015-04-13 23:01:57 +02:00
|
|
|
>base : typeof base, Symbol(base, Decl(arrayBestCommonTypes.ts, 1, 23))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
var t3: { x: string; y: base; }[] = [{ x: undefined, y: new base() }, { x: '', y: new derived() }];
|
2015-04-13 23:01:57 +02:00
|
|
|
>t3 : { x: string; y: base; }[], Symbol(t3, Decl(arrayBestCommonTypes.ts, 33, 15))
|
|
|
|
>x : string, Symbol(x, Decl(arrayBestCommonTypes.ts, 33, 21))
|
|
|
|
>y : base, Symbol(y, Decl(arrayBestCommonTypes.ts, 33, 32))
|
|
|
|
>base : base, Symbol(base, Decl(arrayBestCommonTypes.ts, 1, 23))
|
2014-10-13 15:56:58 +02:00
|
|
|
>[{ x: undefined, y: new base() }, { x: '', y: new derived() }] : { x: string; y: derived; }[]
|
2014-08-15 23:33:16 +02:00
|
|
|
>{ x: undefined, y: new base() } : { x: undefined; y: base; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : undefined, Symbol(x, Decl(arrayBestCommonTypes.ts, 33, 50))
|
2015-04-13 22:54:22 +02:00
|
|
|
>undefined : undefined, Symbol(undefined)
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : base, Symbol(y, Decl(arrayBestCommonTypes.ts, 33, 64))
|
2014-08-15 23:33:16 +02:00
|
|
|
>new base() : base
|
2015-04-13 23:01:57 +02:00
|
|
|
>base : typeof base, Symbol(base, Decl(arrayBestCommonTypes.ts, 1, 23))
|
2014-08-15 23:33:16 +02:00
|
|
|
>{ x: '', y: new derived() } : { x: string; y: derived; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : string, Symbol(x, Decl(arrayBestCommonTypes.ts, 33, 83))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'' : string
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : derived, Symbol(y, Decl(arrayBestCommonTypes.ts, 33, 90))
|
2014-08-15 23:33:16 +02:00
|
|
|
>new derived() : derived
|
2015-04-13 23:01:57 +02:00
|
|
|
>derived : typeof derived, Symbol(derived, Decl(arrayBestCommonTypes.ts, 3, 36))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
var anyObj: any = null;
|
2015-04-13 23:01:57 +02:00
|
|
|
>anyObj : any, Symbol(anyObj, Decl(arrayBestCommonTypes.ts, 35, 15))
|
2015-04-13 21:36:11 +02:00
|
|
|
>null : null
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
// Order matters here so test all the variants
|
|
|
|
var a1 = [{ x: 0, y: 'a' }, { x: 'a', y: 'a' }, { x: anyObj, y: 'a' }];
|
2015-04-13 23:01:57 +02:00
|
|
|
>a1 : { x: any; y: string; }[], Symbol(a1, Decl(arrayBestCommonTypes.ts, 37, 15))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[{ x: 0, y: 'a' }, { x: 'a', y: 'a' }, { x: anyObj, y: 'a' }] : { x: any; y: string; }[]
|
|
|
|
>{ x: 0, y: 'a' } : { x: number; y: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : number, Symbol(x, Decl(arrayBestCommonTypes.ts, 37, 23))
|
2015-04-13 21:36:11 +02:00
|
|
|
>0 : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : string, Symbol(y, Decl(arrayBestCommonTypes.ts, 37, 29))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2014-10-10 23:41:14 +02:00
|
|
|
>{ x: 'a', y: 'a' } : { x: string; y: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : string, Symbol(x, Decl(arrayBestCommonTypes.ts, 37, 41))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : string, Symbol(y, Decl(arrayBestCommonTypes.ts, 37, 49))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2014-10-10 23:41:14 +02:00
|
|
|
>{ x: anyObj, y: 'a' } : { x: any; y: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : any, Symbol(x, Decl(arrayBestCommonTypes.ts, 37, 61))
|
|
|
|
>anyObj : any, Symbol(anyObj, Decl(arrayBestCommonTypes.ts, 35, 15))
|
|
|
|
>y : string, Symbol(y, Decl(arrayBestCommonTypes.ts, 37, 72))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
var a2 = [{ x: anyObj, y: 'a' }, { x: 0, y: 'a' }, { x: 'a', y: 'a' }];
|
2015-04-13 23:01:57 +02:00
|
|
|
>a2 : { x: any; y: string; }[], Symbol(a2, Decl(arrayBestCommonTypes.ts, 38, 15))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[{ x: anyObj, y: 'a' }, { x: 0, y: 'a' }, { x: 'a', y: 'a' }] : { x: any; y: string; }[]
|
|
|
|
>{ x: anyObj, y: 'a' } : { x: any; y: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : any, Symbol(x, Decl(arrayBestCommonTypes.ts, 38, 23))
|
|
|
|
>anyObj : any, Symbol(anyObj, Decl(arrayBestCommonTypes.ts, 35, 15))
|
|
|
|
>y : string, Symbol(y, Decl(arrayBestCommonTypes.ts, 38, 34))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2014-10-10 23:41:14 +02:00
|
|
|
>{ x: 0, y: 'a' } : { x: number; y: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : number, Symbol(x, Decl(arrayBestCommonTypes.ts, 38, 46))
|
2015-04-13 21:36:11 +02:00
|
|
|
>0 : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : string, Symbol(y, Decl(arrayBestCommonTypes.ts, 38, 52))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2014-10-10 23:41:14 +02:00
|
|
|
>{ x: 'a', y: 'a' } : { x: string; y: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : string, Symbol(x, Decl(arrayBestCommonTypes.ts, 38, 64))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : string, Symbol(y, Decl(arrayBestCommonTypes.ts, 38, 72))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
var a3 = [{ x: 0, y: 'a' }, { x: anyObj, y: 'a' }, { x: 'a', y: 'a' }];
|
2015-04-13 23:01:57 +02:00
|
|
|
>a3 : { x: any; y: string; }[], Symbol(a3, Decl(arrayBestCommonTypes.ts, 39, 15))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[{ x: 0, y: 'a' }, { x: anyObj, y: 'a' }, { x: 'a', y: 'a' }] : { x: any; y: string; }[]
|
|
|
|
>{ x: 0, y: 'a' } : { x: number; y: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : number, Symbol(x, Decl(arrayBestCommonTypes.ts, 39, 23))
|
2015-04-13 21:36:11 +02:00
|
|
|
>0 : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : string, Symbol(y, Decl(arrayBestCommonTypes.ts, 39, 29))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2014-10-10 23:41:14 +02:00
|
|
|
>{ x: anyObj, y: 'a' } : { x: any; y: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : any, Symbol(x, Decl(arrayBestCommonTypes.ts, 39, 41))
|
|
|
|
>anyObj : any, Symbol(anyObj, Decl(arrayBestCommonTypes.ts, 35, 15))
|
|
|
|
>y : string, Symbol(y, Decl(arrayBestCommonTypes.ts, 39, 52))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2014-10-10 23:41:14 +02:00
|
|
|
>{ x: 'a', y: 'a' } : { x: string; y: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : string, Symbol(x, Decl(arrayBestCommonTypes.ts, 39, 64))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : string, Symbol(y, Decl(arrayBestCommonTypes.ts, 39, 72))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
var ifaceObj: iface = null;
|
2015-04-13 23:01:57 +02:00
|
|
|
>ifaceObj : iface, Symbol(ifaceObj, Decl(arrayBestCommonTypes.ts, 41, 15))
|
|
|
|
>iface : iface, Symbol(iface, Decl(arrayBestCommonTypes.ts, 0, 19))
|
2015-04-13 21:36:11 +02:00
|
|
|
>null : null
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
var baseObj = new base();
|
2015-04-13 23:01:57 +02:00
|
|
|
>baseObj : base, Symbol(baseObj, Decl(arrayBestCommonTypes.ts, 42, 15))
|
2014-08-15 23:33:16 +02:00
|
|
|
>new base() : base
|
2015-04-13 23:01:57 +02:00
|
|
|
>base : typeof base, Symbol(base, Decl(arrayBestCommonTypes.ts, 1, 23))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
var base2Obj = new base2();
|
2015-04-13 23:01:57 +02:00
|
|
|
>base2Obj : base2, Symbol(base2Obj, Decl(arrayBestCommonTypes.ts, 43, 15))
|
2014-08-15 23:33:16 +02:00
|
|
|
>new base2() : base2
|
2015-04-13 23:01:57 +02:00
|
|
|
>base2 : typeof base2, Symbol(base2, Decl(arrayBestCommonTypes.ts, 2, 35))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
var b1 = [baseObj, base2Obj, ifaceObj];
|
2015-04-13 23:01:57 +02:00
|
|
|
>b1 : iface[], Symbol(b1, Decl(arrayBestCommonTypes.ts, 45, 15))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[baseObj, base2Obj, ifaceObj] : iface[]
|
2015-04-13 23:01:57 +02:00
|
|
|
>baseObj : base, Symbol(baseObj, Decl(arrayBestCommonTypes.ts, 42, 15))
|
|
|
|
>base2Obj : base2, Symbol(base2Obj, Decl(arrayBestCommonTypes.ts, 43, 15))
|
|
|
|
>ifaceObj : iface, Symbol(ifaceObj, Decl(arrayBestCommonTypes.ts, 41, 15))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
var b2 = [base2Obj, baseObj, ifaceObj];
|
2015-04-13 23:01:57 +02:00
|
|
|
>b2 : iface[], Symbol(b2, Decl(arrayBestCommonTypes.ts, 46, 15))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[base2Obj, baseObj, ifaceObj] : iface[]
|
2015-04-13 23:01:57 +02:00
|
|
|
>base2Obj : base2, Symbol(base2Obj, Decl(arrayBestCommonTypes.ts, 43, 15))
|
|
|
|
>baseObj : base, Symbol(baseObj, Decl(arrayBestCommonTypes.ts, 42, 15))
|
|
|
|
>ifaceObj : iface, Symbol(ifaceObj, Decl(arrayBestCommonTypes.ts, 41, 15))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
var b3 = [baseObj, ifaceObj, base2Obj];
|
2015-04-13 23:01:57 +02:00
|
|
|
>b3 : iface[], Symbol(b3, Decl(arrayBestCommonTypes.ts, 47, 15))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[baseObj, ifaceObj, base2Obj] : iface[]
|
2015-04-13 23:01:57 +02:00
|
|
|
>baseObj : base, Symbol(baseObj, Decl(arrayBestCommonTypes.ts, 42, 15))
|
|
|
|
>ifaceObj : iface, Symbol(ifaceObj, Decl(arrayBestCommonTypes.ts, 41, 15))
|
|
|
|
>base2Obj : base2, Symbol(base2Obj, Decl(arrayBestCommonTypes.ts, 43, 15))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
var b4 = [ifaceObj, baseObj, base2Obj];
|
2015-04-13 23:01:57 +02:00
|
|
|
>b4 : iface[], Symbol(b4, Decl(arrayBestCommonTypes.ts, 48, 15))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[ifaceObj, baseObj, base2Obj] : iface[]
|
2015-04-13 23:01:57 +02:00
|
|
|
>ifaceObj : iface, Symbol(ifaceObj, Decl(arrayBestCommonTypes.ts, 41, 15))
|
|
|
|
>baseObj : base, Symbol(baseObj, Decl(arrayBestCommonTypes.ts, 42, 15))
|
|
|
|
>base2Obj : base2, Symbol(base2Obj, Decl(arrayBestCommonTypes.ts, 43, 15))
|
2014-10-10 23:41:14 +02:00
|
|
|
}
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-10-10 23:41:14 +02:00
|
|
|
module NonEmptyTypes {
|
2015-04-13 23:01:57 +02:00
|
|
|
>NonEmptyTypes : typeof NonEmptyTypes, Symbol(NonEmptyTypes, Decl(arrayBestCommonTypes.ts, 51, 1))
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
interface iface { x: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>iface : iface, Symbol(iface, Decl(arrayBestCommonTypes.ts, 53, 22))
|
|
|
|
>x : string, Symbol(x, Decl(arrayBestCommonTypes.ts, 54, 21))
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
class base implements iface { x: string; y: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>base : base, Symbol(base, Decl(arrayBestCommonTypes.ts, 54, 34))
|
|
|
|
>iface : iface, Symbol(iface, Decl(arrayBestCommonTypes.ts, 53, 22))
|
|
|
|
>x : string, Symbol(x, Decl(arrayBestCommonTypes.ts, 55, 33))
|
|
|
|
>y : string, Symbol(y, Decl(arrayBestCommonTypes.ts, 55, 44))
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
class base2 implements iface { x: string; z: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>base2 : base2, Symbol(base2, Decl(arrayBestCommonTypes.ts, 55, 57))
|
|
|
|
>iface : iface, Symbol(iface, Decl(arrayBestCommonTypes.ts, 53, 22))
|
|
|
|
>x : string, Symbol(x, Decl(arrayBestCommonTypes.ts, 56, 34))
|
|
|
|
>z : string, Symbol(z, Decl(arrayBestCommonTypes.ts, 56, 45))
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
class derived extends base { a: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>derived : derived, Symbol(derived, Decl(arrayBestCommonTypes.ts, 56, 58))
|
|
|
|
>base : base, Symbol(base, Decl(arrayBestCommonTypes.ts, 54, 34))
|
|
|
|
>a : string, Symbol(a, Decl(arrayBestCommonTypes.ts, 57, 32))
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
|
|
|
|
class f {
|
2015-04-13 23:01:57 +02:00
|
|
|
>f : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 57, 45))
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
public voidIfAny(x: boolean, y?: boolean): number;
|
2015-04-13 23:01:57 +02:00
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
|
|
|
>x : boolean, Symbol(x, Decl(arrayBestCommonTypes.ts, 61, 25))
|
|
|
|
>y : boolean, Symbol(y, Decl(arrayBestCommonTypes.ts, 61, 36))
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
public voidIfAny(x: string, y?: boolean): number;
|
2015-04-13 23:01:57 +02:00
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
|
|
|
>x : string, Symbol(x, Decl(arrayBestCommonTypes.ts, 62, 25))
|
|
|
|
>y : boolean, Symbol(y, Decl(arrayBestCommonTypes.ts, 62, 35))
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
public voidIfAny(x: number, y?: boolean): number;
|
2015-04-13 23:01:57 +02:00
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
|
|
|
>x : number, Symbol(x, Decl(arrayBestCommonTypes.ts, 63, 25))
|
|
|
|
>y : boolean, Symbol(y, Decl(arrayBestCommonTypes.ts, 63, 35))
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
public voidIfAny(x: any, y = false): any { return null; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
|
|
|
>x : any, Symbol(x, Decl(arrayBestCommonTypes.ts, 64, 25))
|
|
|
|
>y : boolean, Symbol(y, Decl(arrayBestCommonTypes.ts, 64, 32))
|
2015-04-13 21:36:11 +02:00
|
|
|
>false : boolean
|
|
|
|
>null : null
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
public x() {
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : () => void, Symbol(x, Decl(arrayBestCommonTypes.ts, 64, 65))
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
<number>(this.voidIfAny([4, 2][0]));
|
|
|
|
><number>(this.voidIfAny([4, 2][0])) : number
|
|
|
|
>(this.voidIfAny([4, 2][0])) : number
|
|
|
|
>this.voidIfAny([4, 2][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 57, 45))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[4, 2][0] : number
|
|
|
|
>[4, 2] : number[]
|
2015-04-13 21:36:11 +02:00
|
|
|
>4 : number
|
|
|
|
>2 : number
|
|
|
|
>0 : number
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
<number>(this.voidIfAny([4, 2, undefined][0]));
|
|
|
|
><number>(this.voidIfAny([4, 2, undefined][0])) : number
|
|
|
|
>(this.voidIfAny([4, 2, undefined][0])) : number
|
|
|
|
>this.voidIfAny([4, 2, undefined][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 57, 45))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[4, 2, undefined][0] : number
|
|
|
|
>[4, 2, undefined] : number[]
|
2015-04-13 21:36:11 +02:00
|
|
|
>4 : number
|
|
|
|
>2 : number
|
2015-04-13 22:54:22 +02:00
|
|
|
>undefined : undefined, Symbol(undefined)
|
2015-04-13 21:36:11 +02:00
|
|
|
>0 : number
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
<number>(this.voidIfAny([undefined, 2, 4][0]));
|
|
|
|
><number>(this.voidIfAny([undefined, 2, 4][0])) : number
|
|
|
|
>(this.voidIfAny([undefined, 2, 4][0])) : number
|
|
|
|
>this.voidIfAny([undefined, 2, 4][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 57, 45))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[undefined, 2, 4][0] : number
|
|
|
|
>[undefined, 2, 4] : number[]
|
2015-04-13 22:54:22 +02:00
|
|
|
>undefined : undefined, Symbol(undefined)
|
2015-04-13 21:36:11 +02:00
|
|
|
>2 : number
|
|
|
|
>4 : number
|
|
|
|
>0 : number
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
<number>(this.voidIfAny([null, 2, 4][0]));
|
|
|
|
><number>(this.voidIfAny([null, 2, 4][0])) : number
|
|
|
|
>(this.voidIfAny([null, 2, 4][0])) : number
|
|
|
|
>this.voidIfAny([null, 2, 4][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 57, 45))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[null, 2, 4][0] : number
|
|
|
|
>[null, 2, 4] : number[]
|
2015-04-13 21:36:11 +02:00
|
|
|
>null : null
|
|
|
|
>2 : number
|
|
|
|
>4 : number
|
|
|
|
>0 : number
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
<number>(this.voidIfAny([2, 4, null][0]));
|
|
|
|
><number>(this.voidIfAny([2, 4, null][0])) : number
|
|
|
|
>(this.voidIfAny([2, 4, null][0])) : number
|
|
|
|
>this.voidIfAny([2, 4, null][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 57, 45))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[2, 4, null][0] : number
|
|
|
|
>[2, 4, null] : number[]
|
2015-04-13 21:36:11 +02:00
|
|
|
>2 : number
|
|
|
|
>4 : number
|
|
|
|
>null : null
|
|
|
|
>0 : number
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
<number>(this.voidIfAny([undefined, 4, null][0]));
|
|
|
|
><number>(this.voidIfAny([undefined, 4, null][0])) : number
|
|
|
|
>(this.voidIfAny([undefined, 4, null][0])) : number
|
|
|
|
>this.voidIfAny([undefined, 4, null][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 57, 45))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[undefined, 4, null][0] : number
|
|
|
|
>[undefined, 4, null] : number[]
|
2015-04-13 22:54:22 +02:00
|
|
|
>undefined : undefined, Symbol(undefined)
|
2015-04-13 21:36:11 +02:00
|
|
|
>4 : number
|
|
|
|
>null : null
|
|
|
|
>0 : number
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
<number>(this.voidIfAny(['', "q"][0]));
|
|
|
|
><number>(this.voidIfAny(['', "q"][0])) : number
|
|
|
|
>(this.voidIfAny(['', "q"][0])) : number
|
|
|
|
>this.voidIfAny(['', "q"][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 57, 45))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
2014-10-10 23:41:14 +02:00
|
|
|
>['', "q"][0] : string
|
|
|
|
>['', "q"] : string[]
|
2015-04-13 21:36:11 +02:00
|
|
|
>'' : string
|
|
|
|
>"q" : string
|
|
|
|
>0 : number
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
<number>(this.voidIfAny(['', "q", undefined][0]));
|
|
|
|
><number>(this.voidIfAny(['', "q", undefined][0])) : number
|
|
|
|
>(this.voidIfAny(['', "q", undefined][0])) : number
|
|
|
|
>this.voidIfAny(['', "q", undefined][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 57, 45))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
2014-10-10 23:41:14 +02:00
|
|
|
>['', "q", undefined][0] : string
|
|
|
|
>['', "q", undefined] : string[]
|
2015-04-13 21:36:11 +02:00
|
|
|
>'' : string
|
|
|
|
>"q" : string
|
2015-04-13 22:54:22 +02:00
|
|
|
>undefined : undefined, Symbol(undefined)
|
2015-04-13 21:36:11 +02:00
|
|
|
>0 : number
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
<number>(this.voidIfAny([undefined, "q", ''][0]));
|
|
|
|
><number>(this.voidIfAny([undefined, "q", ''][0])) : number
|
|
|
|
>(this.voidIfAny([undefined, "q", ''][0])) : number
|
|
|
|
>this.voidIfAny([undefined, "q", ''][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 57, 45))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[undefined, "q", ''][0] : string
|
|
|
|
>[undefined, "q", ''] : string[]
|
2015-04-13 22:54:22 +02:00
|
|
|
>undefined : undefined, Symbol(undefined)
|
2015-04-13 21:36:11 +02:00
|
|
|
>"q" : string
|
|
|
|
>'' : string
|
|
|
|
>0 : number
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
<number>(this.voidIfAny([null, "q", ''][0]));
|
|
|
|
><number>(this.voidIfAny([null, "q", ''][0])) : number
|
|
|
|
>(this.voidIfAny([null, "q", ''][0])) : number
|
|
|
|
>this.voidIfAny([null, "q", ''][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 57, 45))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[null, "q", ''][0] : string
|
|
|
|
>[null, "q", ''] : string[]
|
2015-04-13 21:36:11 +02:00
|
|
|
>null : null
|
|
|
|
>"q" : string
|
|
|
|
>'' : string
|
|
|
|
>0 : number
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
<number>(this.voidIfAny(["q", '', null][0]));
|
|
|
|
><number>(this.voidIfAny(["q", '', null][0])) : number
|
|
|
|
>(this.voidIfAny(["q", '', null][0])) : number
|
|
|
|
>this.voidIfAny(["q", '', null][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 57, 45))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
2014-10-10 23:41:14 +02:00
|
|
|
>["q", '', null][0] : string
|
|
|
|
>["q", '', null] : string[]
|
2015-04-13 21:36:11 +02:00
|
|
|
>"q" : string
|
|
|
|
>'' : string
|
|
|
|
>null : null
|
|
|
|
>0 : number
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
<number>(this.voidIfAny([undefined, '', null][0]));
|
|
|
|
><number>(this.voidIfAny([undefined, '', null][0])) : number
|
|
|
|
>(this.voidIfAny([undefined, '', null][0])) : number
|
|
|
|
>this.voidIfAny([undefined, '', null][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 57, 45))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[undefined, '', null][0] : string
|
|
|
|
>[undefined, '', null] : string[]
|
2015-04-13 22:54:22 +02:00
|
|
|
>undefined : undefined, Symbol(undefined)
|
2015-04-13 21:36:11 +02:00
|
|
|
>'' : string
|
|
|
|
>null : null
|
|
|
|
>0 : number
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
<number>(this.voidIfAny([[3, 4], [null]][0][0]));
|
|
|
|
><number>(this.voidIfAny([[3, 4], [null]][0][0])) : number
|
|
|
|
>(this.voidIfAny([[3, 4], [null]][0][0])) : number
|
|
|
|
>this.voidIfAny([[3, 4], [null]][0][0]) : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>this.voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
|
|
|
>this : f, Symbol(f, Decl(arrayBestCommonTypes.ts, 57, 45))
|
|
|
|
>voidIfAny : { (x: boolean, y?: boolean): number; (x: string, y?: boolean): number; (x: number, y?: boolean): number; }, Symbol(voidIfAny, Decl(arrayBestCommonTypes.ts, 60, 13), Decl(arrayBestCommonTypes.ts, 61, 58), Decl(arrayBestCommonTypes.ts, 62, 57), Decl(arrayBestCommonTypes.ts, 63, 57))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[[3, 4], [null]][0][0] : number
|
|
|
|
>[[3, 4], [null]][0] : number[]
|
|
|
|
>[[3, 4], [null]] : number[][]
|
|
|
|
>[3, 4] : number[]
|
2015-04-13 21:36:11 +02:00
|
|
|
>3 : number
|
|
|
|
>4 : number
|
2014-10-10 23:41:14 +02:00
|
|
|
>[null] : null[]
|
2015-04-13 21:36:11 +02:00
|
|
|
>null : null
|
|
|
|
>0 : number
|
|
|
|
>0 : number
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
|
|
|
|
var t1: { x: number; y: base; }[] = [{ x: 7, y: new derived() }, { x: 5, y: new base() }];
|
2015-04-13 23:01:57 +02:00
|
|
|
>t1 : { x: number; y: base; }[], Symbol(t1, Decl(arrayBestCommonTypes.ts, 84, 15))
|
|
|
|
>x : number, Symbol(x, Decl(arrayBestCommonTypes.ts, 84, 21))
|
|
|
|
>y : base, Symbol(y, Decl(arrayBestCommonTypes.ts, 84, 32))
|
|
|
|
>base : base, Symbol(base, Decl(arrayBestCommonTypes.ts, 54, 34))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[{ x: 7, y: new derived() }, { x: 5, y: new base() }] : { x: number; y: base; }[]
|
|
|
|
>{ x: 7, y: new derived() } : { x: number; y: derived; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : number, Symbol(x, Decl(arrayBestCommonTypes.ts, 84, 50))
|
2015-04-13 21:36:11 +02:00
|
|
|
>7 : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : derived, Symbol(y, Decl(arrayBestCommonTypes.ts, 84, 56))
|
2014-10-10 23:41:14 +02:00
|
|
|
>new derived() : derived
|
2015-04-13 23:01:57 +02:00
|
|
|
>derived : typeof derived, Symbol(derived, Decl(arrayBestCommonTypes.ts, 56, 58))
|
2014-10-10 23:41:14 +02:00
|
|
|
>{ x: 5, y: new base() } : { x: number; y: base; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : number, Symbol(x, Decl(arrayBestCommonTypes.ts, 84, 78))
|
2015-04-13 21:36:11 +02:00
|
|
|
>5 : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : base, Symbol(y, Decl(arrayBestCommonTypes.ts, 84, 84))
|
2014-10-10 23:41:14 +02:00
|
|
|
>new base() : base
|
2015-04-13 23:01:57 +02:00
|
|
|
>base : typeof base, Symbol(base, Decl(arrayBestCommonTypes.ts, 54, 34))
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
var t2: { x: boolean; y: base; }[] = [{ x: true, y: new derived() }, { x: false, y: new base() }];
|
2015-04-13 23:01:57 +02:00
|
|
|
>t2 : { x: boolean; y: base; }[], Symbol(t2, Decl(arrayBestCommonTypes.ts, 85, 15))
|
|
|
|
>x : boolean, Symbol(x, Decl(arrayBestCommonTypes.ts, 85, 21))
|
|
|
|
>y : base, Symbol(y, Decl(arrayBestCommonTypes.ts, 85, 33))
|
|
|
|
>base : base, Symbol(base, Decl(arrayBestCommonTypes.ts, 54, 34))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[{ x: true, y: new derived() }, { x: false, y: new base() }] : { x: boolean; y: base; }[]
|
|
|
|
>{ x: true, y: new derived() } : { x: boolean; y: derived; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : boolean, Symbol(x, Decl(arrayBestCommonTypes.ts, 85, 51))
|
2015-04-13 21:36:11 +02:00
|
|
|
>true : boolean
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : derived, Symbol(y, Decl(arrayBestCommonTypes.ts, 85, 60))
|
2014-10-10 23:41:14 +02:00
|
|
|
>new derived() : derived
|
2015-04-13 23:01:57 +02:00
|
|
|
>derived : typeof derived, Symbol(derived, Decl(arrayBestCommonTypes.ts, 56, 58))
|
2014-10-10 23:41:14 +02:00
|
|
|
>{ x: false, y: new base() } : { x: boolean; y: base; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : boolean, Symbol(x, Decl(arrayBestCommonTypes.ts, 85, 82))
|
2015-04-13 21:36:11 +02:00
|
|
|
>false : boolean
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : base, Symbol(y, Decl(arrayBestCommonTypes.ts, 85, 92))
|
2014-10-10 23:41:14 +02:00
|
|
|
>new base() : base
|
2015-04-13 23:01:57 +02:00
|
|
|
>base : typeof base, Symbol(base, Decl(arrayBestCommonTypes.ts, 54, 34))
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
var t3: { x: string; y: base; }[] = [{ x: undefined, y: new base() }, { x: '', y: new derived() }];
|
2015-04-13 23:01:57 +02:00
|
|
|
>t3 : { x: string; y: base; }[], Symbol(t3, Decl(arrayBestCommonTypes.ts, 86, 15))
|
|
|
|
>x : string, Symbol(x, Decl(arrayBestCommonTypes.ts, 86, 21))
|
|
|
|
>y : base, Symbol(y, Decl(arrayBestCommonTypes.ts, 86, 32))
|
|
|
|
>base : base, Symbol(base, Decl(arrayBestCommonTypes.ts, 54, 34))
|
2014-10-18 01:53:18 +02:00
|
|
|
>[{ x: undefined, y: new base() }, { x: '', y: new derived() }] : ({ x: undefined; y: base; } | { x: string; y: derived; })[]
|
2014-10-10 23:41:14 +02:00
|
|
|
>{ x: undefined, y: new base() } : { x: undefined; y: base; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : undefined, Symbol(x, Decl(arrayBestCommonTypes.ts, 86, 50))
|
2015-04-13 22:54:22 +02:00
|
|
|
>undefined : undefined, Symbol(undefined)
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : base, Symbol(y, Decl(arrayBestCommonTypes.ts, 86, 64))
|
2014-10-10 23:41:14 +02:00
|
|
|
>new base() : base
|
2015-04-13 23:01:57 +02:00
|
|
|
>base : typeof base, Symbol(base, Decl(arrayBestCommonTypes.ts, 54, 34))
|
2014-10-10 23:41:14 +02:00
|
|
|
>{ x: '', y: new derived() } : { x: string; y: derived; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : string, Symbol(x, Decl(arrayBestCommonTypes.ts, 86, 83))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'' : string
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : derived, Symbol(y, Decl(arrayBestCommonTypes.ts, 86, 90))
|
2014-10-10 23:41:14 +02:00
|
|
|
>new derived() : derived
|
2015-04-13 23:01:57 +02:00
|
|
|
>derived : typeof derived, Symbol(derived, Decl(arrayBestCommonTypes.ts, 56, 58))
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
var anyObj: any = null;
|
2015-04-13 23:01:57 +02:00
|
|
|
>anyObj : any, Symbol(anyObj, Decl(arrayBestCommonTypes.ts, 88, 15))
|
2015-04-13 21:36:11 +02:00
|
|
|
>null : null
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
// Order matters here so test all the variants
|
|
|
|
var a1 = [{ x: 0, y: 'a' }, { x: 'a', y: 'a' }, { x: anyObj, y: 'a' }];
|
2015-04-13 23:01:57 +02:00
|
|
|
>a1 : { x: any; y: string; }[], Symbol(a1, Decl(arrayBestCommonTypes.ts, 90, 15))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[{ x: 0, y: 'a' }, { x: 'a', y: 'a' }, { x: anyObj, y: 'a' }] : { x: any; y: string; }[]
|
|
|
|
>{ x: 0, y: 'a' } : { x: number; y: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : number, Symbol(x, Decl(arrayBestCommonTypes.ts, 90, 23))
|
2015-04-13 21:36:11 +02:00
|
|
|
>0 : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : string, Symbol(y, Decl(arrayBestCommonTypes.ts, 90, 29))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2014-10-10 23:41:14 +02:00
|
|
|
>{ x: 'a', y: 'a' } : { x: string; y: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : string, Symbol(x, Decl(arrayBestCommonTypes.ts, 90, 41))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : string, Symbol(y, Decl(arrayBestCommonTypes.ts, 90, 49))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2014-10-10 23:41:14 +02:00
|
|
|
>{ x: anyObj, y: 'a' } : { x: any; y: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : any, Symbol(x, Decl(arrayBestCommonTypes.ts, 90, 61))
|
|
|
|
>anyObj : any, Symbol(anyObj, Decl(arrayBestCommonTypes.ts, 88, 15))
|
|
|
|
>y : string, Symbol(y, Decl(arrayBestCommonTypes.ts, 90, 72))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
var a2 = [{ x: anyObj, y: 'a' }, { x: 0, y: 'a' }, { x: 'a', y: 'a' }];
|
2015-04-13 23:01:57 +02:00
|
|
|
>a2 : { x: any; y: string; }[], Symbol(a2, Decl(arrayBestCommonTypes.ts, 91, 15))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[{ x: anyObj, y: 'a' }, { x: 0, y: 'a' }, { x: 'a', y: 'a' }] : { x: any; y: string; }[]
|
|
|
|
>{ x: anyObj, y: 'a' } : { x: any; y: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : any, Symbol(x, Decl(arrayBestCommonTypes.ts, 91, 23))
|
|
|
|
>anyObj : any, Symbol(anyObj, Decl(arrayBestCommonTypes.ts, 88, 15))
|
|
|
|
>y : string, Symbol(y, Decl(arrayBestCommonTypes.ts, 91, 34))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2014-10-10 23:41:14 +02:00
|
|
|
>{ x: 0, y: 'a' } : { x: number; y: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : number, Symbol(x, Decl(arrayBestCommonTypes.ts, 91, 46))
|
2015-04-13 21:36:11 +02:00
|
|
|
>0 : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : string, Symbol(y, Decl(arrayBestCommonTypes.ts, 91, 52))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2014-10-10 23:41:14 +02:00
|
|
|
>{ x: 'a', y: 'a' } : { x: string; y: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : string, Symbol(x, Decl(arrayBestCommonTypes.ts, 91, 64))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : string, Symbol(y, Decl(arrayBestCommonTypes.ts, 91, 72))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
var a3 = [{ x: 0, y: 'a' }, { x: anyObj, y: 'a' }, { x: 'a', y: 'a' }];
|
2015-04-13 23:01:57 +02:00
|
|
|
>a3 : { x: any; y: string; }[], Symbol(a3, Decl(arrayBestCommonTypes.ts, 92, 15))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[{ x: 0, y: 'a' }, { x: anyObj, y: 'a' }, { x: 'a', y: 'a' }] : { x: any; y: string; }[]
|
|
|
|
>{ x: 0, y: 'a' } : { x: number; y: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : number, Symbol(x, Decl(arrayBestCommonTypes.ts, 92, 23))
|
2015-04-13 21:36:11 +02:00
|
|
|
>0 : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : string, Symbol(y, Decl(arrayBestCommonTypes.ts, 92, 29))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2014-10-10 23:41:14 +02:00
|
|
|
>{ x: anyObj, y: 'a' } : { x: any; y: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : any, Symbol(x, Decl(arrayBestCommonTypes.ts, 92, 41))
|
|
|
|
>anyObj : any, Symbol(anyObj, Decl(arrayBestCommonTypes.ts, 88, 15))
|
|
|
|
>y : string, Symbol(y, Decl(arrayBestCommonTypes.ts, 92, 52))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2014-10-10 23:41:14 +02:00
|
|
|
>{ x: 'a', y: 'a' } : { x: string; y: string; }
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : string, Symbol(x, Decl(arrayBestCommonTypes.ts, 92, 64))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : string, Symbol(y, Decl(arrayBestCommonTypes.ts, 92, 72))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'a' : string
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
var ifaceObj: iface = null;
|
2015-04-13 23:01:57 +02:00
|
|
|
>ifaceObj : iface, Symbol(ifaceObj, Decl(arrayBestCommonTypes.ts, 94, 15))
|
|
|
|
>iface : iface, Symbol(iface, Decl(arrayBestCommonTypes.ts, 53, 22))
|
2015-04-13 21:36:11 +02:00
|
|
|
>null : null
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
var baseObj = new base();
|
2015-04-13 23:01:57 +02:00
|
|
|
>baseObj : base, Symbol(baseObj, Decl(arrayBestCommonTypes.ts, 95, 15))
|
2014-10-10 23:41:14 +02:00
|
|
|
>new base() : base
|
2015-04-13 23:01:57 +02:00
|
|
|
>base : typeof base, Symbol(base, Decl(arrayBestCommonTypes.ts, 54, 34))
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
var base2Obj = new base2();
|
2015-04-13 23:01:57 +02:00
|
|
|
>base2Obj : base2, Symbol(base2Obj, Decl(arrayBestCommonTypes.ts, 96, 15))
|
2014-10-10 23:41:14 +02:00
|
|
|
>new base2() : base2
|
2015-04-13 23:01:57 +02:00
|
|
|
>base2 : typeof base2, Symbol(base2, Decl(arrayBestCommonTypes.ts, 55, 57))
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
var b1 = [baseObj, base2Obj, ifaceObj];
|
2015-04-13 23:01:57 +02:00
|
|
|
>b1 : iface[], Symbol(b1, Decl(arrayBestCommonTypes.ts, 98, 15))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[baseObj, base2Obj, ifaceObj] : iface[]
|
2015-04-13 23:01:57 +02:00
|
|
|
>baseObj : base, Symbol(baseObj, Decl(arrayBestCommonTypes.ts, 95, 15))
|
|
|
|
>base2Obj : base2, Symbol(base2Obj, Decl(arrayBestCommonTypes.ts, 96, 15))
|
|
|
|
>ifaceObj : iface, Symbol(ifaceObj, Decl(arrayBestCommonTypes.ts, 94, 15))
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
var b2 = [base2Obj, baseObj, ifaceObj];
|
2015-04-13 23:01:57 +02:00
|
|
|
>b2 : iface[], Symbol(b2, Decl(arrayBestCommonTypes.ts, 99, 15))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[base2Obj, baseObj, ifaceObj] : iface[]
|
2015-04-13 23:01:57 +02:00
|
|
|
>base2Obj : base2, Symbol(base2Obj, Decl(arrayBestCommonTypes.ts, 96, 15))
|
|
|
|
>baseObj : base, Symbol(baseObj, Decl(arrayBestCommonTypes.ts, 95, 15))
|
|
|
|
>ifaceObj : iface, Symbol(ifaceObj, Decl(arrayBestCommonTypes.ts, 94, 15))
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
var b3 = [baseObj, ifaceObj, base2Obj];
|
2015-04-13 23:01:57 +02:00
|
|
|
>b3 : iface[], Symbol(b3, Decl(arrayBestCommonTypes.ts, 100, 15))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[baseObj, ifaceObj, base2Obj] : iface[]
|
2015-04-13 23:01:57 +02:00
|
|
|
>baseObj : base, Symbol(baseObj, Decl(arrayBestCommonTypes.ts, 95, 15))
|
|
|
|
>ifaceObj : iface, Symbol(ifaceObj, Decl(arrayBestCommonTypes.ts, 94, 15))
|
|
|
|
>base2Obj : base2, Symbol(base2Obj, Decl(arrayBestCommonTypes.ts, 96, 15))
|
2014-10-10 23:41:14 +02:00
|
|
|
|
|
|
|
var b4 = [ifaceObj, baseObj, base2Obj];
|
2015-04-13 23:01:57 +02:00
|
|
|
>b4 : iface[], Symbol(b4, Decl(arrayBestCommonTypes.ts, 101, 15))
|
2014-10-10 23:41:14 +02:00
|
|
|
>[ifaceObj, baseObj, base2Obj] : iface[]
|
2015-04-13 23:01:57 +02:00
|
|
|
>ifaceObj : iface, Symbol(ifaceObj, Decl(arrayBestCommonTypes.ts, 94, 15))
|
|
|
|
>baseObj : base, Symbol(baseObj, Decl(arrayBestCommonTypes.ts, 95, 15))
|
|
|
|
>base2Obj : base2, Symbol(base2Obj, Decl(arrayBestCommonTypes.ts, 96, 15))
|
2014-10-10 23:41:14 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
|