Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying TypeScript 5 Design Patterns and Best Practices
  • Table Of Contents Toc
  • Feedback & Rating feedback
TypeScript 5 Design Patterns and Best Practices

TypeScript 5 Design Patterns and Best Practices - Second Edition

By : Theofanis Despoudis
5 (1)
close
close
TypeScript 5 Design Patterns and Best Practices

TypeScript 5 Design Patterns and Best Practices

5 (1)
By: Theofanis Despoudis

Overview of this book

Design patterns are the foundation of many world-class software applications, from commercial solutions to open-source projects. This guide equips you with the skills to architect robust, scalable, and maintainable TypeScript 5 applications. Whether you're looking to master modern TypeScript or apply proven software architecture patterns effectively, this book is your go-to resource. Written by Theofanis Despoudis, a recognized TypeScript expert, this second edition is fully updated with TypeScript 5’s latest features, including improved type inference, union enums, and decorators. These updates will help you write cleaner, more maintainable code that adapts to future changes. You’ll dive into classic Gang of Four design patterns through both traditional and modern real-world implementations, gaining hands-on experience with practical applications. You’ll also gain a clear understanding of the power of functional and reactive programming patterns specifically designed for idiomatic TypeScript development. By the end of this book, you’ll be able to identify and apply the right design pattern for any scenario and craft well-structured, maintainable, and testable code.
Table of Contents (17 chapters)
close
close
Lock Free Chapter
1
Part 1:Introduction to TypeScript 5
4
Part 2: TypeScript Core Design Patterns
9
Part 3: Advanced TypeScript Concepts and Best Practices

The Proxy pattern

The Proxy pattern is a structural design pattern that gives us a way to call methods on an object via another object (sometimes called a surrogate object). This pattern is particularly useful for adding a layer of control over how and when an object is accessed.

The Proxy pattern can also be used to control access to objects in terms of security and performance optimizations. For instance, a proxy can be used to lazy load a resource-intensive object or restrict access to sensitive data.

One analogy of this pattern is a company secretary accepting calls on behalf of the company director. They can regulate the flow of calls and may or may not forward them to the director based on who’s calling and why. This pattern works very similarly to the Decorator pattern that you learned about earlier. It also wraps an object and provides it with extra functionality.

With the Decorator pattern, you can wrap an object with the same interface and it will decorate...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
TypeScript 5 Design Patterns and Best Practices
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon