Skip to content

Feature: Support for Annotation #290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dinbtechit opened this issue Jul 21, 2022 · 4 comments
Closed

Feature: Support for Annotation #290

dinbtechit opened this issue Jul 21, 2022 · 4 comments

Comments

@dinbtechit
Copy link

dinbtechit commented Jul 21, 2022

This is a great package but would be nice if there were annotations. This will make the code cleaner. I would like to implement this. But I am looking for some guidance. Or some reference to get_it architecture.

@Injectable(type= "singleton" | "lazySingleton" | "factory" (default), primary=true | false (default), order = 1 )
class InjectableClass {

}

Usage:

@Injectable 
class A {
  
}

@Injectable 
class B {
  B(A a) {}    // <<--<<  A gets injected here.
}
@mjablecnik
Copy link

@dinbtechit You can use injectable package with get_it.

@dinbtechit
Copy link
Author

dinbtechit commented Jul 29, 2022

the injectable package has a ton of issues. I thought it would be nice to have some first-class support for injectable annotation. But I would totally agree if you think that's outside the scope of this package. Cheers.

@iandis
Copy link

iandis commented Aug 6, 2022

I've been using injectable package with get_it for production apps and have never faced any issue at all. Definitely worth to try👍

@dinbtechit
Copy link
Author

closing this as there is a package, injectable for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants