Composite Pattern in TypeScript

The Composite design pattern is a structural pattern useful for hierarchical management.

The Composite design pattern,

  • Allows you to represent individual entities(leaves) and groups of leaves as the same.
  • Is a structural design pattern that lets you compose objects into a changeable tree structure.
  • Is great if you need the option of swapping hierarchical relationships around.
  • Allows you to add/remove components to the hierarchy.
  • Provides flexibility…

--

--

--

A Design Pattern is a description or template that can be repeatedly applied to a commonly recurring problem in software design. A familiarity of Design Patterns is very useful when planning, discussing, managing and documenting your applications from now on and into the future.

Recommended from Medium

How it feels to learn JavaScript in 2018

Why Is Web Application Development Important for Enterprises?

Build responsive PWA using Next.js

Experiences so far learning React JS and in Side Hustle Internship

Making Music With Machine Learning: Introduction to Magenta Music.js

Get Reactive With RxJS

10 Tricky Question For Javascript Interview

Getting Started With Angular and Go — Setting Up A Boilerplate Project.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sean Bradley

Sean Bradley

Developer of real time, low latency, high availability, asynchronous, multi threaded, remotely managed, fully automated and monitored solutions.

More from Medium

Flyweight Pattern in TypeScript

Summary of high-level built-in types in TypeScript

typescript

Getting Started with Index Signatures

Higher-Order Functions With TypeScript (2022)

Macbook with Code