Complete the code to create a type alias named Age for the number type.
type Age = [1];The type keyword creates a type alias. Here, Age is an alias for number.
Complete the code to define a type alias Point for an object with x and y as numbers.
type Point = [1];The type alias Point describes an object with two properties, x and y, both numbers.
Fix the error by completing the type alias for a union of string literals representing directions.
type Direction = [1];Union types use the pipe | to combine string literals. Quotes are needed around each string.
Fill all three blanks to create a type alias Response that can be either a string or a number.
type Response = [1] [2] [3];
& instead of | for union.|.The union type uses | to allow Response to be either string or number.
Fill all three blanks to create a type alias User for an object with id as number, name as string, and an optional age as number.
type User = { id: [1]; name: [2]; age?: [3]; };?.The User type has id and optional age as numbers, and name as a string. The question mark ? marks age as optional.