This approach is written keeping loopback4-soft-delete codebase in mind but should work for others having similar structure. Ideally when the only thing that class/mixin does is calling
super.someMethod
and is to be used with two or more different parent classes.
Remove all classes providing soft-crud for different underlying repository, change the type of base class being accepted by mixin to an explicit interface that only includes methods/properties that are actually of use in the mixin's code.)
The main exports in the package are SoftCrudRepositoryMixin
, the SoftCrudRepository
class and one for transaction repo. Aiming to serve the same purpose with different underlying class but with mixin it's possible to pass any other class as base having similar interface as DefaultCrudRepository
from loopback.