I'm recommend using JSDoc comments above each property
I'm recommend using JSDoc comments above each property.
Benefits:
1. It provides enhanced autocomplete support. The comments are exposed via modern IDEs.
2. Helpful in code reviews and during maintenance.
3. Often exposes design bugs and sloppy thinking.
Example of #3:
Here's a bad API design. Why? Because it allows illogical combinations.
The comment makes it obvious:

Here's a refactored design that uses a single prop to streamline the API and protect from impossible states.
We don't have to apologize or provide warnings about the design in a comment anymore. 👍
