r/javascript • u/PMilos • May 22 '19
JavaScript Clean Code - Best Practices - based on Robert C. Martin's book Clean Code
https://devinduct.com/blogpost/22/javascript-clean-code-best-practices
542
Upvotes
r/javascript • u/PMilos • May 22 '19
1
u/Ozymandias-X May 23 '19
But then, when I want to use the function, I now get no type hints whatsoever about what information it needs to work. All I see is that it can give it a mysterious blobby object that might have fields of some kind. Never mind if I accidentally misstype one of the keys. That's a nightmare level error to find.
This can only be solved by extensive documentation of the function and we all know that such documentation often lies when people refactor or extend functions and forget to update the docs.