remove-ts
v1.0.1
Published
Remove TypeScript types and convert files
Downloads
1
Maintainers
Readme
Remove TypeScript Types
A tool to automatically remove TypeScript type annotations from your codebase while preserving JavaScript functionality.
Features
- Converts TypeScript files to JavaScript
- Renames
.ts→.jsand.tsx→.jsx - Removes type annotations, interfaces, and type-only imports
- Preserves code formatting and structure
- Handles complex TypeScript syntax like generics, assertions, and modifiers
- Optional Vite support for removing 'use client' directives
Basic Usage
# Convert TypeScript files in src directory
npx remove-ts ./src
# Convert with Vite support (removes 'use client')
npx remove-ts ./src --vite
# Convert and test build
npx remove-ts ./src --test
# Convert and format with prettier
npx remove-ts ./src --prettier