I have this array. With the current type definition, I still get a type error when trying to use either key (e.g. Type 'Vector3 | Euler' is not assignable to type 'Vector3 | undefined'.
How would I best type this?
const data: Array<Record<string, Vector3 | Euler>> = [
{
position: [0, 0, -20],
rotation: [0, 0, 0],
},
{
position: [0, 0, 20],
rotation: [0, 0, 0],
},
{
position: [25, 0, 0],
rotation: [0, angleToRadians(90), 0],
},
{
position: [-25, 0, 0],
rotation: [0, angleToRadians(-90), 0],
},
];```