labs42io / clean-code-typescript

Clean Code concepts adapted for TypeScript
https://labs42io.github.io/clean-code-typescript
MIT License
9.29k stars 1.14k forks source link

Adding recommendation for constructor arguments #60

Closed gbrandtio closed 1 year ago

gbrandtio commented 1 year ago
gbrandtio commented 1 year ago

@dimadeveatii could you kindly review this and let me know of your thoughts ?

dimadeveatii commented 1 year ago

@gbrandtio nice one, but this is covered in Function arguments section. I don't think we need an additional one for class constructors.

gbrandtio commented 1 year ago

@dimadeveatii thanks for the feedback. Thought that it would helpful to explicitly mention about contstructor arguments as well, since it is missed out many times - as well as the builder pattern alternative.

I appreciate that the function arguments section might be implicitly mean also constructors, therefore closing this PR.