WARNING
If your class doesn't extend another provider, you should always prefer using constructor-based injection.
The nestjs docs does mention the reason to always prefer constructor-based injection. It states that if your class doesn't extend another provider then we should always use constructor-based injection.
What this means is that if your class has optional dependencies then you can use property-based injection otherwise you have to use constructor-based injection.
Consider, Class A which depends on Class B and Class A will not work if Class B is not injected in this case this is a mandatory dependency hence we have to use constructor-based injection.
Whereas, same Class A also depends on Class C but Class A will still work if Class C is not injected in this case it is an optional dependency hence we can use property-based injection here.
You can read more about this here:
https://khalilstemmler.com/articles/tutorials/dependency-injection-inversion-explained/
http://dillonbuchanan.com/programming/dependency-injection-constructor-vs-property/