-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Angular Design Patterns and Best Practices
By :

In this chapter, we saw how we can use TypeScript to create better-quality code with less effort, increasing our productivity. We learned about basic TypeScript types, such as number
, string
, and Array
.
We also studied creating classes, interfaces, and type aliases, and how we can choose and mix these types of structures to make our code cleaner and more maintainable.
Finally, we learned about TypeScript’s type inference mechanism and how we can use the concept of type guards to further improve the type-checking mechanism. With these concepts, we also became familiar with the unknown
type, which provides a better alternative to the any
type.
In the next chapter we will learn about the basics of the interfaces of an Angular project, that is, the Components.