Resolve object by specific type: resolveAs<S, T extends S>
vanlooverenkoen opened this issue · comments
During testing we want to be using a moc implementation of a specific class. But in our tests we want to setup,seed, configure our mocks.
That is why we need a method that can give us an Object from a specific type. That was previously registered.
Something like this:
static T resolveAs<S, T extends S>() => kiwi.Container().resolve<S>() as T;
Fixed in kiwi 1.1.0