34 lines
824 B
Text
34 lines
824 B
Text
=== tests/cases/conformance/types/typeRelationships/widenedTypes/objectLiteralWidened.ts ===
|
|
// object literal properties are widened to any
|
|
|
|
var x = {
|
|
>x : { foo: any; bar: any; }
|
|
>{ foo: null, bar: undefined} : { foo: null; bar: undefined; }
|
|
|
|
foo: null,
|
|
>foo : null
|
|
|
|
bar: undefined
|
|
>bar : undefined
|
|
>undefined : undefined
|
|
}
|
|
|
|
var y = {
|
|
>y : { foo: any; bar: { baz: any; boo: any; }; }
|
|
>{ foo: null, bar: { baz: null, boo: undefined }} : { foo: null; bar: { baz: null; boo: undefined; }; }
|
|
|
|
foo: null,
|
|
>foo : null
|
|
|
|
bar: {
|
|
>bar : { baz: null; boo: undefined; }
|
|
>{ baz: null, boo: undefined } : { baz: null; boo: undefined; }
|
|
|
|
baz: null,
|
|
>baz : null
|
|
|
|
boo: undefined
|
|
>boo : undefined
|
|
>undefined : undefined
|
|
}
|
|
}
|