Generates and maintains TypeScript documentation
Generates and maintains TypeScript documentation including TSDoc comments, README files, API docs, and changelogs.
/plugin marketplace add IvanTorresEdge/molcajete.ai/plugin install js@Molcajete.aiExecutes documentation workflows for TypeScript projects. Generates TSDoc comments, README files, API documentation, and maintains changelogs.
Reference general TypeScript documentation best practices:
post-change-verification skill:
<pkg> run format to format code<pkg> run lint to lint code (ZERO warnings required)<pkg> run type-check for type verification (ZERO errors required)<pkg> test for affected tests/**
* Formats a date string to a human-readable format.
*
* @param date - The ISO date string to format
* @param locale - Optional locale for formatting (default: 'en-US')
* @returns The formatted date string
* @throws {Error} If the date string is invalid
*
* @example
* ```typescript
* formatDate('2024-12-08T10:30:00Z');
* // Returns: 'December 8, 2024'
*
* formatDate('2024-12-08T10:30:00Z', 'de-DE');
* // Returns: '8. Dezember 2024'
* ```
*/
export function formatDate(date: string, locale = 'en-US'): string {
// implementation
}
/**
* Configuration options for the API client.
*
* @example
* ```typescript
* const config: ApiClientConfig = {
* baseUrl: 'https://api.example.com',
* timeout: 5000,
* retries: 3,
* };
* ```
*/
export interface ApiClientConfig {
/** The base URL for API requests */
baseUrl: string;
/** Request timeout in milliseconds (default: 10000) */
timeout?: number;
/** Number of retry attempts for failed requests (default: 0) */
retries?: number;
/** Custom headers to include in all requests */
headers?: Record<string, string>;
}
/**
* HTTP client for making API requests with automatic retries.
*
* @example
* ```typescript
* const client = new ApiClient({
* baseUrl: 'https://api.example.com',
* timeout: 5000,
* });
*
* const user = await client.get<User>('/users/123');
* ```
*/
export class ApiClient {
/**
* Creates a new API client instance.
*
* @param config - Configuration options for the client
*/
constructor(private config: ApiClientConfig) {}
/**
* Makes a GET request to the specified endpoint.
*
* @typeParam T - The expected response type
* @param endpoint - The API endpoint (relative to baseUrl)
* @returns The parsed response data
* @throws {ApiError} If the request fails
*/
async get<T>(endpoint: string): Promise<T> {
// implementation
}
}
# Project Name
Brief description of what the project does.
## Installation
\`\`\`bash
npm install package-name
\`\`\`
## Quick Start
\`\`\`typescript
import { something } from 'package-name';
// Example usage
const result = something();
\`\`\`
## API Reference
### `functionName(param: Type): ReturnType`
Description of the function.
**Parameters:**
- `param` - Description of parameter
**Returns:** Description of return value
**Example:**
\`\`\`typescript
// Example code
\`\`\`
## Configuration
Description of configuration options.
## Development
\`\`\`bash
npm install # Install dependencies
npm run dev # Start development
npm test # Run tests
npm run build # Build for production
\`\`\`
## Contributing
Guidelines for contributing.
## License
MIT
Follow Keep a Changelog format:
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/),
and this project adheres to [Semantic Versioning](https://semver.org/).
## [Unreleased]
### Added
- New feature description
### Changed
- Changed behavior description
### Fixed
- Bug fix description
## [1.0.0] - 2024-12-08
### Added
- Initial release
- Core functionality
[Unreleased]: https://github.com/user/repo/compare/v1.0.0...HEAD
[1.0.0]: https://github.com/user/repo/releases/tag/v1.0.0
Installation:
npm install -D typedoc
typedoc.json:
{
"entryPoints": ["src/index.ts"],
"out": "docs",
"exclude": ["**/__tests__/**", "**/*.test.ts"],
"excludePrivate": true,
"excludeProtected": true,
"includeVersion": true,
"readme": "README.md"
}
Generate docs:
npx typedoc
Designs feature architectures by analyzing existing codebase patterns and conventions, then providing comprehensive implementation blueprints with specific files to create/modify, component designs, data flows, and build sequences