

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Interfaces
incomplete
2: Extending Interfaces
incomplete
3: Extending Multiple Interfaces
incomplete
4: Overriding Interface Properties
incomplete
5: Declaration Merging
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Click to play video
As it turns out, there are two ways to define object types: the type keyword (as we've seen with type aliases) and interfaces:
type Superhero = {
name: string;
powers: string[];
isAvenger: boolean;
};
interface Superhero {
name: string;
powers: string[];
isAvenger: boolean;
}
I'm a huuuuge fan of having multiple ways to do the same things in a language... /s
In 9/10 scenarios, they work the same way, but there are a few key differences that we'll cover in this chapter. For now, just know that I recommend using type in most cases, but there are a few scenarios where interface is the better choice, which we'll talk about later.
We need a way to get analytics on each of Support.ai's support sessions. Each session contains basic info about the session as well as the customer's feedback on the interaction.