arcs icon indicating copy to clipboard operation
arcs copied to clipboard

Implement type union/intersection for nested references

Open shans opened this issue 4 years ago • 0 comments

(from b/156983624)

schema intersection has been implemented so that reference fields will be dropped unless their contained types match exactly.

Probably this should be implemented by instead performing an intersection of their contained types.

e.g. Foo { ref: &Person { name, age } } intersect Foo { ref: &Person { name, height } } should result in Foo { ref: &Person { name } }

TS impl at https://github.com/PolymerLabs/arcs/blob/master/src/runtime/schema.ts#L158

shans avatar Apr 27 '21 23:04 shans