InterviewSolution
Saved Bookmarks
| 1. |
What are type aliases? How do you create one? |
|
Answer» Type aliases give a new, meaningful NAME for a type. They don’t create new TYPES but create new names that refer to that type. For example, you can alias a union type to avoid TYPING all the types everywhere that value is being used. type alphanumeric = string | number;LET value: alphanumeric = "";value = 10; |
|