convert_to_typescript
Convert JavaScript code to TypeScript with comprehensive type annotations, modern best practices, and production-ready output including tests and documentation.
Instructions
Convert JavaScript code to TypeScript with comprehensive type annotations and modern best practices
WORKFLOW: Ideal for creating production-ready code, tests, and documentation TIP: Generate unlimited iterations locally, then review with Claude SAVES: Claude context for strategic decisions
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| addTypeGuards | No | Add type guard functions for runtime type checking | |
| analysisDepth | No | Level of conversion detail | comprehensive |
| analysisType | No | Type of conversion to perform | comprehensive |
| code | No | JavaScript code to convert (for single-file conversion) | |
| filePath | No | Path to single JavaScript file to convert | |
| files | No | Array of specific JavaScript file paths to convert | |
| maxDepth | No | Maximum directory depth for multi-file discovery (1-5) | |
| module | No | Module system | ESNext |
| preserveComments | No | Preserve original comments and add TSDoc | |
| projectPath | No | Path to project root (for multi-file conversion) | |
| strict | No | Use strict TypeScript mode | |
| target | No | TypeScript compilation target | ES2020 |
| useEnums | No | Use enums for fixed value sets | |
| useInterfaces | No | Prefer interfaces over type aliases |