You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to ask to the container to not instantiate the class but to return it as is? For example;
class StrategyA { }
container.add('myStrategy', StrategyA)
// later...
const Strategy = container.get('myStrategy')
const strategy = new Strategy()
strategy.doThings()
Due to previous very bad design I will need the class itself instead of an instance of the class. Is that possible? Currently I have this ugly workaround;
Hi Slava, thank you for the great work.
Is there a way to ask to the container to not instantiate the class but to return it as is? For example;
Due to previous very bad design I will need the class itself instead of an instance of the class. Is that possible? Currently I have this ugly workaround;
The text was updated successfully, but these errors were encountered: