3

TypeScript Patterns for Angular

Since version 2 of the framework, Angular is based on TypeScript for its development, both internally and for those who use it to build applications.

This was a controversial decision at the time, as this JavaScript superset, created by Microsoft, was new. Nowadays, most web frameworks, such as React, Vue.js, and Svelte, support TypeScript, and some web frameworks actively recommend TypeScript as the language to use.

In this chapter, we will study the best practices and patterns for using TypeScript with Angular and beyond; these techniques can be applied to Node.js backend development and even other web frameworks, such as React and Vue.js.

We’ll learn how to better declare our application’s methods and functions ...

Get Angular Design Patterns and Best Practices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.