The implementation
In the project, I use the tsyringe lib to "dynamically" choose the provider instance.
So, it is possible to change the type of implementation at run time.
The blocker
Currently, tsyringe does not allow the removal of a specific instance.
Just general cleaning of objects. Which is not a very good approach for now.
The solution
I opened a Pull Request for the library with the feature for unregistering based on the key.
It is still in the queue for approval by the team.
Feature - Unregister a token #190
I will be waiting for this PR to complete this proof of concept.
The implementation
In the project, I use the
tsyringelib to "dynamically" choose the provider instance.So, it is possible to change the type of implementation at run time.
The blocker
Currently,
tsyringedoes not allow the removal of a specific instance.Just general cleaning of objects. Which is not a very good approach for now.
The solution
I opened a Pull Request for the library with the feature for unregistering based on the key.
It is still in the queue for approval by the team.
Feature - Unregister a token #190
I will be waiting for this PR to complete this proof of concept.