Toying with the idea of a MediatR style command pattern in TypeScript.
See the index.ts file to see how a command is invoked with an expected TResponse.
As seen in the example handler test-handler.ts, each handler is responsible with initializing and registering itself in a singleton manner.
A very simple Container
The only thing the container knows is to map an incoming request type name to a pre-registered handler.