2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/bestCommonTypeWithOptionalProperties.ts ===
|
|
|
|
interface X { foo: string }
|
2015-04-13 23:01:57 +02:00
|
|
|
>X : X, Symbol(X, Decl(bestCommonTypeWithOptionalProperties.ts, 0, 0))
|
|
|
|
>foo : string, Symbol(foo, Decl(bestCommonTypeWithOptionalProperties.ts, 0, 13))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
interface Y extends X { bar?: number }
|
2015-04-13 23:01:57 +02:00
|
|
|
>Y : Y, Symbol(Y, Decl(bestCommonTypeWithOptionalProperties.ts, 0, 27))
|
|
|
|
>X : X, Symbol(X, Decl(bestCommonTypeWithOptionalProperties.ts, 0, 0))
|
|
|
|
>bar : number, Symbol(bar, Decl(bestCommonTypeWithOptionalProperties.ts, 1, 23))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
interface Z extends X { bar: string }
|
2015-04-13 23:01:57 +02:00
|
|
|
>Z : Z, Symbol(Z, Decl(bestCommonTypeWithOptionalProperties.ts, 1, 38))
|
|
|
|
>X : X, Symbol(X, Decl(bestCommonTypeWithOptionalProperties.ts, 0, 0))
|
|
|
|
>bar : string, Symbol(bar, Decl(bestCommonTypeWithOptionalProperties.ts, 2, 23))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var x: X;
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : X, Symbol(x, Decl(bestCommonTypeWithOptionalProperties.ts, 4, 3))
|
|
|
|
>X : X, Symbol(X, Decl(bestCommonTypeWithOptionalProperties.ts, 0, 0))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var y: Y;
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : Y, Symbol(y, Decl(bestCommonTypeWithOptionalProperties.ts, 5, 3))
|
|
|
|
>Y : Y, Symbol(Y, Decl(bestCommonTypeWithOptionalProperties.ts, 0, 27))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var z: Z;
|
2015-04-13 23:01:57 +02:00
|
|
|
>z : Z, Symbol(z, Decl(bestCommonTypeWithOptionalProperties.ts, 6, 3))
|
|
|
|
>Z : Z, Symbol(Z, Decl(bestCommonTypeWithOptionalProperties.ts, 1, 38))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
// All these arrays should be X[]
|
|
|
|
var b1 = [x, y, z];
|
2015-04-13 23:01:57 +02:00
|
|
|
>b1 : X[], Symbol(b1, Decl(bestCommonTypeWithOptionalProperties.ts, 9, 3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>[x, y, z] : X[]
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : X, Symbol(x, Decl(bestCommonTypeWithOptionalProperties.ts, 4, 3))
|
|
|
|
>y : Y, Symbol(y, Decl(bestCommonTypeWithOptionalProperties.ts, 5, 3))
|
|
|
|
>z : Z, Symbol(z, Decl(bestCommonTypeWithOptionalProperties.ts, 6, 3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var b2 = [x, z, y];
|
2015-04-13 23:01:57 +02:00
|
|
|
>b2 : X[], Symbol(b2, Decl(bestCommonTypeWithOptionalProperties.ts, 10, 3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>[x, z, y] : X[]
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : X, Symbol(x, Decl(bestCommonTypeWithOptionalProperties.ts, 4, 3))
|
|
|
|
>z : Z, Symbol(z, Decl(bestCommonTypeWithOptionalProperties.ts, 6, 3))
|
|
|
|
>y : Y, Symbol(y, Decl(bestCommonTypeWithOptionalProperties.ts, 5, 3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var b3 = [y, x, z];
|
2015-04-13 23:01:57 +02:00
|
|
|
>b3 : X[], Symbol(b3, Decl(bestCommonTypeWithOptionalProperties.ts, 11, 3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>[y, x, z] : X[]
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : Y, Symbol(y, Decl(bestCommonTypeWithOptionalProperties.ts, 5, 3))
|
|
|
|
>x : X, Symbol(x, Decl(bestCommonTypeWithOptionalProperties.ts, 4, 3))
|
|
|
|
>z : Z, Symbol(z, Decl(bestCommonTypeWithOptionalProperties.ts, 6, 3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var b4 = [y, z, x];
|
2015-04-13 23:01:57 +02:00
|
|
|
>b4 : X[], Symbol(b4, Decl(bestCommonTypeWithOptionalProperties.ts, 12, 3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>[y, z, x] : X[]
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : Y, Symbol(y, Decl(bestCommonTypeWithOptionalProperties.ts, 5, 3))
|
|
|
|
>z : Z, Symbol(z, Decl(bestCommonTypeWithOptionalProperties.ts, 6, 3))
|
|
|
|
>x : X, Symbol(x, Decl(bestCommonTypeWithOptionalProperties.ts, 4, 3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var b5 = [z, x, y];
|
2015-04-13 23:01:57 +02:00
|
|
|
>b5 : X[], Symbol(b5, Decl(bestCommonTypeWithOptionalProperties.ts, 13, 3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>[z, x, y] : X[]
|
2015-04-13 23:01:57 +02:00
|
|
|
>z : Z, Symbol(z, Decl(bestCommonTypeWithOptionalProperties.ts, 6, 3))
|
|
|
|
>x : X, Symbol(x, Decl(bestCommonTypeWithOptionalProperties.ts, 4, 3))
|
|
|
|
>y : Y, Symbol(y, Decl(bestCommonTypeWithOptionalProperties.ts, 5, 3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var b6 = [z, y, x];
|
2015-04-13 23:01:57 +02:00
|
|
|
>b6 : X[], Symbol(b6, Decl(bestCommonTypeWithOptionalProperties.ts, 14, 3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>[z, y, x] : X[]
|
2015-04-13 23:01:57 +02:00
|
|
|
>z : Z, Symbol(z, Decl(bestCommonTypeWithOptionalProperties.ts, 6, 3))
|
|
|
|
>y : Y, Symbol(y, Decl(bestCommonTypeWithOptionalProperties.ts, 5, 3))
|
|
|
|
>x : X, Symbol(x, Decl(bestCommonTypeWithOptionalProperties.ts, 4, 3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|