How can I concatenate two arrays of different type A and B and keep it with separate typings as a result and not just
Array<A | B>
and destructuring array back I want to keep types
const [a1, a2] = concatenated;
const [,, b1, b2] = concatenated;