type Foo = { field: number, } var x: {field?: number} = {}; var y: $Shape = x; (y.field: number)