2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/conformance/types/typeRelationships/widenedTypes/objectLiteralWidened.ts ===
|
|
|
|
// object literal properties are widened to any
|
|
|
|
|
|
|
|
var x = {
|
|
|
|
>x : { foo: any; bar: any; }
|
2014-08-22 03:39:46 +02:00
|
|
|
>{ foo: null, bar: undefined} : { foo: null; bar: undefined; }
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
foo: null,
|
2014-09-10 21:58:30 +02:00
|
|
|
>foo : null
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
bar: undefined
|
2014-09-10 21:58:30 +02:00
|
|
|
>bar : undefined
|
2014-08-15 23:33:16 +02:00
|
|
|
>undefined : undefined
|
|
|
|
}
|
|
|
|
|
|
|
|
var y = {
|
|
|
|
>y : { foo: any; bar: { baz: any; boo: any; }; }
|
2014-08-22 03:39:46 +02:00
|
|
|
>{ foo: null, bar: { baz: null, boo: undefined }} : { foo: null; bar: { baz: null; boo: undefined; }; }
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
foo: null,
|
2014-09-10 21:58:30 +02:00
|
|
|
>foo : null
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
bar: {
|
2014-09-10 21:58:30 +02:00
|
|
|
>bar : { baz: null; boo: undefined; }
|
2014-08-22 03:39:46 +02:00
|
|
|
>{ baz: null, boo: undefined } : { baz: null; boo: undefined; }
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
baz: null,
|
2014-09-10 21:58:30 +02:00
|
|
|
>baz : null
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
boo: undefined
|
2014-09-10 21:58:30 +02:00
|
|
|
>boo : undefined
|
2014-08-15 23:33:16 +02:00
|
|
|
>undefined : undefined
|
|
|
|
}
|
|
|
|
}
|