This course has been updated! We now recommend you take the TypeScript Fundamentals, v3 course.
Transcript from the "Type Aliases" Lesson
>> Mike North: So finally, before we begin the next exercise there's this one last clue that's gonna help you out. We can create a type alias, particularly when you're working with tuples. It's tough to look at a tuple and kind of keep all of these straight, right. You might have three or four or five things that all look like three numbers together.
[00:00:20] Like this could be a color rgb or it could be xyz coordinates or something like that. We can give it a name using a type, the type keyword. So here we're saying, I'm gonna use this word color and what I really mean is a tuple of size three containing number, number, number.
>> Mike North: You can export this and import it from another class, or use it in another interface, whatever you wanna do. This color now, it is usable anywhere, other types are usable. Just like in interface, just like these type literals we've been creating. So, feel free to go about using that.