Abstraction

Abstraction is an incredibly powerful concept in object-oriented development. It encompasses the idea of hiding specific implementation details while providing the high-level definition of what should be implemented. In the previous example, we saw a very basic case of abstraction. The IActivator interface creates the abstraction layer needed to handle the concept of activating the application. The LocalActivator and ServerActivator types are concrete implementations of this abstraction. In other programming languages such as C#, classes are able to declare specific members as abstract. This forces any subclasses of the base type to provide a concrete implementation of that member. In the following code segment, you will see a C# example ...

Get TypeScript Essentials 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.