Liftric/DIKit

Constructor dependency injection

benjohnde opened this issue · 2 comments

Currently, a propertyWrapper can neither be used on local variables nor on a constructor / functions. There is already a possibility to use constructor dependency injection like:

let backend: BackendProtocol
init(backend: BackendProtocol = resolve()) {
   self.backend = backend
}

So either add this Example to the unit tests / integration tests and to the README or think about a different way.

Added to README