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.