When working with type intersection, it's important to note that certain examples function smoothly:
type Merged = (
{ lorems: { foo: string }[] } &
{ lorems: { bar: string }[] }
);
const x: Merged;
x.lorems[0].foo; // this is fine
x.lorems[0].bar; // this works too
However, array methods do not inherently support type intersections, as demonstrated here:
x.lorems.shift().foo; // works
x.lorems.shift().bar; // error encountered
An unconventional solution exists to address this issue:
(x.lorems.shift() as typeof x.lorems[0]).bar;
The question remains: Can a unioned type with nested array intersections be created?