Typescript Cheatsheet: Classes

A few weeks back, I shared a cheat sheet for Typescript interfaces. Today, I want to share a cheat sheet on classes, which can be complemented with my past entry on Typescript visibility modifiers, as their behavior in Angular has specificities related to HTML templates.

Note the common syntax section with the different options for field declarations:

Click this link to see a larger version in a browser.

Alain Chautard

Alain is a Google Developer Expert in Web Technologies, Angular, and Google Maps. His daily mission is to help development teams adopt Angular and build at scale with the framework. He has taught Angular on all six continents! A world traveler and photographer, Alain is also an international conference speaker, and a published author of several video courses.