Complete the code to define a type that combines properties of A and B.
type AB = A [1] B;The intersection operator & combines types by including all properties from both types.
Complete the code to create a variable with type that has both name and age properties.
const person: [1] = { name: 'Alice', age: 30 };
Using & creates a type with all properties from both A and B.
Fix the error in the type intersection to correctly combine types X and Y.
type XY = X [1] Y;The correct operator to combine types by intersection is &.
Fill both blanks to create a type that combines properties and a variable of that type.
type Combined = [1] & [2]; const obj: Combined = { id: 1, label: 'Item' };
We combine Type1 and Type2 using & to get all properties.
Fill all three blanks to create an intersection type and a variable with all properties.
type Full = [1] & [2] & [3]; const fullObj: Full = { a: 1, b: 'text', c: true };
The intersection of Delta, Beta, and Gamma includes all their properties.
