Documentation Issue: Missing explanation for statement
Closed this issue · 2 comments
jeengbe commented
I'm submitting a...
- Regression
- Bug report
- Feature request
- Documentation issue or request (new chapter/page)
- Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
docs.nestjs.com/content/components.md
Line 164 in ed4f317
Why is this?
Expected behavior
The documentation should also explain why this is the case. I've not heard of this before and can't find any other related discussions online.
Minimal reproduction of the problem with instructions
n/a
What is the motivation / use case for changing the behavior?
n/a
Environment
n/a
For Tooling issues:
n/a
Others:
n/a
kamilmysliwiec commented
Agree we should clarify this in the docs. As for your question, there are 2 key reasons: testing is easier & more straightforward, and the constructor explicitly outlines what dependencies are needed to make this class work (while attributes with random @Inject()
annotations are not as self-descriptive and easier to miss).