TypeScript Tutorial #10: Classes and Access Modifiers
In the previous tutorial, we learned about generics. Now let’s learn about classes in TypeScript — how they work, what access modifiers do, and when you should use them. By the end of this tutorial, you will know how to use public, private, protected, readonly, abstract classes, parameter properties, and how to implement interfaces with classes. Basic Classes A class defines a blueprint for objects. TypeScript adds type annotations to JavaScript classes: ...