Skip to content

Commit fca50e0

Browse files
committed
docs(class-types): add TypeScript class patterns documentation 📚
- Add abstract classes with method signatures and implementations - Add decorator pattern with coffee shop and web request examples - Add factory pattern with simple, abstract, and database factories - Add observer pattern with weather station and stock market examples - Add regular classes with constructor and method patterns - Add singleton pattern with logger and configuration examples - Add static classes with utility functions and factory methods - Add README with A-Z catalog of all class types
1 parent b491034 commit fca50e0

File tree

8 files changed

+2888
-0
lines changed

8 files changed

+2888
-0
lines changed

DEEP-NOTES/Class-Types/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Class Types Deep Notes
2+
3+
_Different ways to structure classes in TypeScript, when to use each pattern, and common design patterns._
4+
5+
## Contents
6+
7+
| File | Topic | One-line |
8+
| ---------------------------------------------- | ----------------- | -------------------------------------------------------------- |
9+
| [abstract-classes.md](./abstract-classes.md) | Abstract Classes | Base classes that cannot be instantiated directly |
10+
| [decorator-pattern.md](./decorator-pattern.md) | Decorator Pattern | Attach new behaviors to objects via wrapper objects |
11+
| [factory-pattern.md](./factory-pattern.md) | Factory Pattern | Interface for creating objects in a superclass |
12+
| [observer-pattern.md](./observer-pattern.md) | Observer Pattern | Subscription mechanism to notify multiple objects about events |
13+
| [regular-classes.md](./regular-classes.md) | Regular Classes | Multiple instances with independent state and behavior |
14+
| [singleton-pattern.md](./singleton-pattern.md) | Singleton Pattern | Exactly one instance with global access point |
15+
| [static-classes.md](./static-classes.md) | Static Classes | Utility classes with only static members, no instances needed |
16+
17+
---
18+
19+
_This series covers TypeScript class structures from basic instances to advanced design patterns, helping you choose the right approach for every coding scenario._

0 commit comments

Comments
 (0)