Entity component system

Entity–component–system (ECS) is an architectural pattern that is mostly used in game development.

Main points:

  1. every entity has unique id;
  2. every logic aspect is a component - raw data linked to the corresponding entity by id;
  3. system performs actions on entities having corresponding aspects/components;
  4. diffenent components can be stored separately;
  5. systems can track entities by using observer pattern.

More details can be found here.

About passing dependencies through deep call stack

Here is another approach to pass dependencies through deep call stack.
In a couple of words:

  1. deeply nested code not executes immediately but returns a function for the later lazy evaluation;
  2. the correponding function accepts the required environment;
  3. at the top level call the function returned from the nested code and pass the environment to it. Documentation.

Umbrella

Here is a collection of typescript libraries for a various scenarios (functional programming, data structrures, various helpers, ui tools, canvas helpers and many others)..

It a great example of granular libraries with clean code.
definitely it can be used in production, and moreover this is an excellent bunch of examples to learn typescript.

P.s. Thanks Vahid Kazemi for the link.