Hacker News new | ask | show | jobs
by kitd 1586 days ago
Completely agree.

I recently had to work on an unfamiliar JS codebase. After initially pulling my hair out trying to understand what objects were being passed where, I decided to define some types and parameters using JSDoc . VsCode picked them up instantly and it was like coding with a language server after that.

1 comments

Also recommend this to learn a new code base which will log every function call:

https://www.npmjs.com/package/@phenomnomnominal/debug

The repo has zero documentation. Do you use it on client, node, or both? Does it renders the calls in a tree?
Oh you're right, sorry. Here's the blog post the dev wrote:

https://dev.to/phenomnominal/lazy-debug-logging-for-node-js-...

The idea is it logs every function call. Nice for picking up a new code base.