Skip to content
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

Default values for @inject() #163

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

SirBernardPhilip
Copy link

Even though there is already the registry, where we can set the providers for the injections. It was discussed in a not so recent issue that the possibility of having default or optional dependencies would be interesting. Since I have not seen it being implemented I came up with this simple first implementation. It does more or less the same that @registry() does but within the @inject() decorator, which will allow for simpler code I believe.

@ghost
Copy link

ghost commented Apr 26, 2021

CLA assistant check
All CLA requirements met.

@MeltingMosaic
Copy link
Collaborator

Interesting. I think this is workable. Could you update the documentation?

@SirBernardPhilip
Copy link
Author

Interesting. I think this is workable. Could you update the documentation?

Great! I have added an extra sentence to the inject() section. If you think it needs further explanation or even an example let me know.

@RaulPROP
Copy link

This would be awesome, any news on 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

Successfully merging this pull request may close these issues.

None yet

3 participants