api-docs
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGenerate API documentation from TypeScript/JavaScript source:
- Scan exports: Find all public functions, classes, and interfaces
- Extract JSDoc: Parse ,
@param,@returns,@throwsannotations@example - Generate missing docs: Add JSDoc for undocumented public APIs
- OpenAPI spec: For HTTP endpoints, generate OpenAPI 3.0 definitions
Dispatch via MCP:
mcp__claude-flow__hooks_worker-dispatch({ trigger: "document", scope: "api" })Conventions:
- Every public export must have a JSDoc comment
- Include with type and description
@param - Include with type and description
@returns - Include for known error conditions
@throws - Include for non-obvious usage
@example
从TypeScript/JavaScript源代码生成API文档:
- 扫描导出内容:查找所有公共函数、类和接口
- 提取JSDoc注释:解析、
@param、@returns、@throws注解@example - 生成缺失文档:为未编写文档的公共API添加JSDoc注释
- OpenAPI规范:针对HTTP端点,生成OpenAPI 3.0定义
通过MCP调度:
mcp__claude-flow__hooks_worker-dispatch({ trigger: "document", scope: "api" })约定:
- 每个公共导出内容必须包含JSDoc注释
- 包含带有类型和描述的
@param - 包含带有类型和描述的
@returns - 为已知错误条件添加
@throws - 为非直观用法添加
@example