I’ve been looking for information about how to implement a host-plugin pattern which in this case are services implementing an interface. This task (information gathering) has been quite difficult for me since English is not my mother lang and I think I’m not using the right “query”.
Having said that, I’m wondering if you guys know how can I implement this pattern using typescript being compiled with ES5.
What I’m dong is a module which exposes authentication services and components. The problem is that I want to support different authentication back-ends (Firebase, IonicCloud) which are supposed to be plugins implementing an interface but I can’t realize how to work with optional dependencies and how to let the developer to choose which implementation he wants to use by just giving the library name and a configuration objet. May I force the developer to provide the instantiated service to the module through a
Thank you for your support!