watcher
watcher copied to clipboard
docs: add comprehensive JSDoc documentation to WatcherOptions type
This PR enhances the TypeScript developer experience by adding comprehensive JSDoc documentation to the WatcherOptions type definition. Each option now includes detailed descriptions, use cases, and default values, making the API more discoverable and easier to use without constantly referring to external documentation.
Changes
- Added JSDoc comments to all
WatcherOptionsproperties with:- Clear descriptions of what each option does
- Practical usage guidance and performance implications
- Default values for each option (using
@defaulttags) - Important behavioral notes (e.g., when options are ignored)
- Cross-references to related options where applicable
- Added a type-level documentation comment linking to the official options documentation
Benefits
- Better IDE Support: IntelliSense and auto-completion will now show helpful descriptions for each option
- Reduced Context Switching: Developers can understand options without leaving their code editor
- Improved Discoverability: Default values and usage guidance help users make informed decisions
- TypeScript-First Documentation: Aligns with the library's TypeScript-ready positioning mentioned in the README