In general, I do something like this, I think how to make it so that you can refer to an existing object.
export class Hand { private render:Render; constructor(render:Render){ this.render = render; } public view(){ this.render.test(); } } export class Render { private hand:Hand; public method(){ this.hand = new Hand(this); } public test(){ } } let render = new Render(); It can put the variable render and others into some kind of an array or object and drag from it and add new ones created to it.
And what if in the Hand suddenly need to refer to another object that I might create in the process. How to delegate the object?
Found something here https://github.com/asvetliakov/Huject but something is difficult to understand, you need to understand
Here's another https://github.com/pleerock/typedi is more understandable