// @flow
type Base = {
s: string,
n: number,
}
type T = {
x: number
} & $Shape<Base>
const t: T = {
s: 'dfg',
x: 133,
}
In case of usage intersection between regular object type and $Shape object, flow says x is missing in object literal, but obviously x is present.
Possible related issue #5702
I can't speak to the error, but you could spread $Shape<Base> into T: Try Flow.
I wish Flow would automatically consider all object intersections an error if any of the intersected types are mutable, because it's too error prone
Most helpful comment
I can't speak to the error, but you could spread
$Shape<Base>intoT: Try Flow.