47 lines
814 B
Text
47 lines
814 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 : any
|
||
|
|
||
|
bar: undefined
|
||
|
>bar : any
|
||
|
>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 : any
|
||
|
|
||
|
bar: {
|
||
|
>bar : { baz: any; boo: any; }
|
||
|
>{
|
||
|
baz: null,
|
||
|
boo: undefined
|
||
|
} : { baz: null; boo: undefined; }
|
||
|
|
||
|
baz: null,
|
||
|
>baz : any
|
||
|
|
||
|
boo: undefined
|
||
|
>boo : any
|
||
|
>undefined : undefined
|
||
|
}
|
||
|
}
|