Skip to content

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.

3 participants