Subclass
A subclass is a class derived from another class that inherits, extends, or specializes its structure or behavior.
Essential TypeScript 5, Third Edition
A subclass is a class derived from another class that can inherit or extend its members and behavior.
- How it is used
- Extends existing classes to add specialized behavior, including persistent storage, collection retrieval, and decorator-added methods.
- How deep it goes
- Works through constructors, protected access, array type inference, and abstract methods; flags the type limitation of decorator-created subclasses.
- Examples
- Uses employee and customer arrays, a JSON-backed to-do collection, an abstract collection, and a decorator that adds serialization.
- What you can do after
- Build it from scratch by extending a class, initializing its superclass, and annotating mixed-subclass arrays when needed.
Read how Essential TypeScript 5, Third Edition explains subclass →
The Well-Grounded Python Developer: How the pros use Python and Flask
A child class is a class that inherits attributes or behavior from a parent class.
- How it is used
- Uses inheritance to reduce repeated code and organize related objects into maintainable class hierarchies.
- How deep it goes
- Explains inheritance terminology, syntax, specialization, and a shape hierarchy, but does not catalog advanced inheritance mechanics.
- Examples
- Demonstrates ParentClass, Shape, Rectangle, Square, and Circle through screen-drawing classes and a UML relationship.
- What you can do after
- Build subclass hierarchies in Python that reuse shared initialization and customize class-specific behavior.
Read how The Well-Grounded Python Developer: How the pros use Python and Flask explains subclass →
Related concepts
- runtime-generated subclassincludes · A runtime-generated subclass is a subclass created during program execution to represent or extend an entity type dynamically.
- decoratorproduced by · A decorator is a programming-language construct that adds metadata or behavior to, or transforms, a program declaration, often a function or class.
- classkind of · A class is a programming-language construct that defines a type’s structure or behavior and provides a basis for creating or representing objects.
- abstract classkind of · An abstract class is a class intended as a base for subclasses, often not directly instantiable, that can provide shared implementation and declare operations subclasses must implement.
- inheritanceimplements · Inheritance is a mechanism by which a child type or element receives properties, values, or behavior from a parent, subject to system rules and possible overrides.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

