Generates comprehensive code documentation including JSDoc comments, README sections, and type definitions.
You are a technical writer who creates excellent code documentation. Generate comprehensive documentation for this code.
[PASTE CODE TO DOCUMENT]
Documentation style: [JSDOC / DOCSTRING / DOXYGEN / RUSTDOC / OTHER]
Audience: [INTERNAL TEAM / OPEN SOURCE / API CONSUMERS]
Language: [LANGUAGE]
Generate:
**File Header**
```[language]
/**
* @file [filename]
* @description [purpose]
* @author [author]
* @created [date]
* @modified [date]
*/
```
**Function/Method Documentation**
```[language]
/**
* Brief description of what the function does.
*
* Detailed description explaining the logic, algorithm,
* or important implementation details.
*
* @param {type} paramName - Description of parameter
* @returns {type} Description of return value
* @throws {ErrorType} When this error occurs
* @example
* // Example usage
* const result = functionName(arg1, arg2);
* // Expected output: description
*
* @see relatedFunction
* @since version
* @deprecated Use newFunction instead
*/
```
**Class Documentation**
```[language]
/**
* Class description
*
* @class ClassName
* @extends ParentClass
* @implements Interface
*
* @property {type} propertyName - Description
*
* @example
* const instance = new ClassName(options);
*/
```
**Inline Comments**
Add inline comments that explain:
- Complex logic
- Business rules
- Performance considerations
- Security implications
- Non-obvious decisions
**README Section**
```markdown
## API Reference
### `functionName(param1, param2)`
Description
**Parameters:**
| Name | Type | Required | Description |
|------|------|----------|-------------|
**Returns:** `Type` - Description
**Example:**
```javascript
// Usage example
```
```
**Type Definitions**
```typescript
// TypeScript interfaces/types
```You are a technical writer who creates excellent code documentation. Generate comprehensive documentation for this code.
[PASTE CODE TO DOCUMENT]
Documentation style: [JSDOC / DOCSTRING / DOXYGEN / RUSTDOC / OTHER]
Audience: [INTERNAL TEAM / OPEN SOURCE / API CONSUMERS]
Language: [LANGUAGE]
Generate:
**File Header**
```[language]
/**
* @file [filename]
* @description [purpose]
* @author [author]
* @created [date]
* @modified [date]
*/
```
**Function/Method Documentation**
```[language]
/**
* Brief description of what the function does.
*
* Detailed description explaining the logic, algorithm,
* or important implementation details.
*
* @param {type} paramName - Description of parameter
* @returns {type} Description of return value
* @throws {ErrorType} When this error occurs
* @example
* // Example usage
* const result = functionName(arg1, arg2);
* // Expected output: description
*
* @see relatedFunction
* @since version
* @deprecated Use newFunction instead
*/
```
**Class Documentation**
```[language]
/**
* Class description
*
* @class ClassName
* @extends ParentClass
* @implements Interface
*
* @property {type} propertyName - Description
*
* @example
* const instance = new ClassName(options);
*/
```
**Inline Comments**
Add inline comments that explain:
- Complex logic
- Business rules
- Performance considerations
- Security implications
- Non-obvious decisions
**README Section**
```markdown
## API Reference
### `functionName(param1, param2)`
Description
**Parameters:**
| Name | Type | Required | Description |
|------|------|----------|-------------|
**Returns:** `Type` - Description
**Example:**
```javascript
// Usage example
```
```
**Type Definitions**
```typescript
// TypeScript interfaces/types
```This prompt is released under CC0 (Public Domain). You are free to use it for any purpose without attribution.
Explore similar prompts based on category and tags
Creates comprehensive Architecture Decision Records with options analysis, decision matrices, and consequence documentation.
Conducts thorough code reviews covering security, performance, maintainability, and best practices with specific fix suggestions.
Analyzes complex error stack traces to identify root causes and provide specific code fixes.
Identifies security vulnerabilities with fixes, OWASP analysis, and comprehensive hardening recommendations.