TypeScript/tests/baselines/reference/objectLiteralWidened.types
2014-08-15 14:37:48 -07:00

47 lines
814 B
Plaintext

=== 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
}
}