2020-06-10
1652
#typescript
Eslam Hefnawy
20034
Jun 10, 2020 â‹… 5 min read

How TypeScript design patterns help you write better code

Eslam Hefnawy Serverless Architect at Serverless, Inc. Co-creator of the Serverless Framework and the lead architect of Serverless Components.

Recent posts:

When To Use Flexbox And When To Use CSS Grid

When to use Flexbox and when to use CSS Grid

Flexbox and Grid are the heart of modern CSS layouts. Learn when to use each and how they help build flexible, responsive web designs — no more hacks or guesswork.

Leonardo Maldonado
Jun 3, 2025 â‹… 9 min read
CSS Breakpoints For Responsive Design

Using CSS breakpoints for fluid, future-proof layouts

Responsive design is evolving. This guide covers media queries, container queries, and fluid design techniques to help your layouts adapt naturally to any screen size.

Rob O'Leary
Jun 3, 2025 â‹… 13 min read
How To Use ForwardRef In React

React forwardRef explained: Usage, alternatives, and React 19 update

ForwardRef lets you pass refs through components to access child DOM nodes directly — learn how and when to use it in React 18 and earlier.

Peter Ekene Eze
Jun 3, 2025 â‹… 14 min read
A Complete Guide to the useEffect React Hook

How to use the useEffect hook in React: A complete guide

Whether you’re new to React Hooks or need a 2025 refresh, this guide to useEffect gives you the tools to use it effectively — and cleanly.

Sebastian Weber
Jun 3, 2025 â‹… 18 min read
View all posts

3 Replies to "How TypeScript design patterns help you write better code"

  1. Why would you write your own observer pattern when you can use a framework like rxjs? Also,JavaScript is not the ‘predecessor’ of Typescript, TypeScript is the superset and is compiled into JavaScript. Finally, in the ‘what you’ll learn section’ you talk about the prototype pattern but I think you mean the proxy pattern.
    Using a visual language like UML can really help I driving your point and makes it more tangible.

  2. To be fair, JavaScript came before and led to Typescript therefore Javascript can be thought of as its predecessor.

  3. Why would you pull external library if the only you need is a patter that you can implement yourself in few lines of code? This article is fantastic explanation of Observer pattern. By the way, rxjs serves a much broader purpose than only Observer pattern.

Leave a Reply