Complete the code to create a type that combines 'hello' and 'world' with a space.
type Greeting = `$[1] ${'world'}`;
The template literal type combines the string literal 'hello' with 'world' separated by a space.
Complete the code to define a type that can be 'red', 'green', or 'blue' using a union.
type Color = [1];The union type uses the pipe symbol '|' to combine string literals into one type.
Fix the error in the template literal type that combines 'cat' or 'dog' with 'food' or 'toy'.
type PetItem = `$[1] ${'food' | 'toy'}`;
The union operator '|' correctly combines 'cat' and 'dog' as possible string literals.
Fill both blanks to create a type for 'small', 'medium', or 'large' sizes with 'shirt' or 'pants'.
type Clothing = `$[1]`$[2];
The first blank is the size union, the second blank is a space string to separate size and clothing type.
Fill all three blanks to create a type for 'red', 'green', or 'blue' colors combined with 'circle' or 'square' shapes, separated by a dash.
type ShapeColor = `$[1]$[2]$[3]`;
The first blank is the color union, the second blank is the dash separator, and the third blank is the shape union.