Complete the code to define a type alias named Result that can be either a string or a number.
type Result = [1];& instead of | which means intersection, not union.|.The | symbol creates a union type, so string | number means the type can be either a string or a number.
Complete the code to define a type alias Status that can be either 'success' or 'error'.
type Status = [1];& which means intersection and is not valid for string literals here.|.Using | creates a union of string literal types, allowing Status to be either 'success' or 'error'.
Fix the error in the type alias Input so it correctly represents a union of boolean or number.
type Input = boolean [1] number;& which means intersection, not union.The union operator | correctly combines boolean and number types.
Fill both blanks to define a type alias Response that can be either a string or an array of numbers.
type Response = [1] | [2];
boolean or object instead of the correct types.|.The type Response can be a string or an array of numbers number[].
Fill all three blanks to define a type alias Data that can be a string, number, or an array of booleans.
type Data = [1] | [2] | [3];
object which is not part of the union.& instead of union |.The type Data can be a string, a number, or an array of booleans boolean[].