Add professional documentation comments to code functions and classes
Add comprehensive documentation comments to the following code:
**Programming Language:** {{LANGUAGE}}
**Documentation Style:** {{DOC_STYLE}} (e.g., JSDoc, Docstring, Javadoc, XML comments)
**Code to Document:**
```{{LANGUAGE}}
{{CODE}}
```
Generate documentation comments that include:
1. **Function/Method Documentation**
- Brief description of purpose
- Detailed explanation (if complex)
- @param tags for all parameters with types and descriptions
- @returns tag with type and description
- @throws/@raises for exceptions
- @example with usage code
- @see for related functions
- @since version (if applicable)
- @deprecated notice (if applicable)
2. **Class/Interface Documentation**
- Class purpose and responsibility
- @author information
- Usage examples
- Property descriptions
3. **Inline Comments**
- Explain complex logic
- Note any assumptions
- Highlight important decisions
Follow {{DOC_STYLE}} conventions and best practices for {{LANGUAGE}}.Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[{LANGUAGE][{DOC_STYLE][{CODE]