import * as Foo from 'foo; a class Foo and use it in one of my services. I use a long list of methods of it that all get an
options array as parameter. Now it would be useful to have these options available in my template via the returned object that I use in there. Of course I could add it to all results in my service, but I am sure I would forget it somewhere - and also this is not really the concern of the service.
So my idea is to write a wrapper class, that adds
options to the
result object on all methods. I then use this wrapper class instead of Foo in my service and everything is taken care of without additional code in the service.
How do I implement such a wrapper class? (Best would be if I could provide an array of method names that are then all extended and use the same logic to add the
options array before calling the parent class instead of doing it for each method)
How do I do this?