Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    Add Custom Data Types with TypeScript Interfaces in Angular


    Right now, our app is just using the generic any type for our habits. The any type basically tells TypeScript to leave us alone and not bother us. This gets our app to work, but it's kind of riding a bike with a deflated back wheel. Angular really shines when you can take advantage of the power of TypeScript. Let's add a custom type for habits using an interface. Then, we'll use it in the habit service and the list and item components.