claudegoodies
Command

typescript-migrate

From davila7

Migrate $ARGUMENTS from JavaScript to TypeScript with proper typing and modern practices.

Install

/typescript-migrate

Facts

Status
Actively maintained
Last commit

Source preview

The instructions Claude Code reads when this command runs.

# TypeScript Migration Assistant

Migrate $ARGUMENTS from JavaScript to TypeScript with proper typing and modern practices.

## Task

I'll help you migrate JavaScript code to TypeScript by:

1. Converting JavaScript files to TypeScript (.js/.jsx to .ts/.tsx)
2. Adding appropriate type definitions and interfaces
3. Configuring TypeScript settings for your project
4. Resolving type errors and compatibility issues
5. Implementing modern TypeScript patterns and features
6. Ensuring backward compatibility with existing code

## Process

I'll follow these steps:

1. Examine your project structure and dependencies
2. Analyze the JavaScript code to understand its functionality
3. Create or update tsconfig.json with appropriate settings
4. Convert files to TypeScript with proper type annotations
5. Add necessary type definitions for libraries
6. Fix type errors and implement type safety
7. Refactor code to leverage TypeScript features

## TypeScript Features I Can Implement

- Interfaces and type aliases for complex data structures
- Generics for reusable, type-safe components and functions
- Union and intersection types for flexible typing
- Enums for related constants
- Utility types (Partial, Pick, Omit, etc.)
- Type guards and type narrowing
- Mapped and conditional types
- Function overloading
- Readonly properties and immutability
- Module augmentation for extending third-party ty
View full source on GitHub →

Other slash commands