Skip to content

Nested dependencies #2

Description

@enthuan

Hello and thank you for this great solution.

I was wondering how you can safely nest dependencies such as in clean architecture

let service = Service()
let usecase = UseCase(service)

Do you have to make the dependency "injected" inside the wrapping object?

struct UseCase {
    @Injected(\.service) var service
}

Some improvement would be to support "scopes" for example to forbid the injection of data services in viewcontrollers. I don't know if it can be easily implemented.

Thanks 👍

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions