super-detype

raw JSON →
2.2.2 verified Fri May 01 auth: no javascript

Super-detype is a CLI tool (v2.2.2) that converts an entire TypeScript project to JavaScript by stripping type annotations and compiling with Babel. It handles Node.js, React, Next.js, Remix, and Vite projects, but not Vue or Svelte. Unlike file-by-file converters or copy-paste tools, it processes whole directories at once. It requires Node >=22 and is primarily used via npx or global install. Release cadence is sporadic. Ships bundled TypeScript types for its own API but the tool itself generates JS.

error Error: Cannot find module 'super-detype'
cause Trying to require() the package without global install or npx.
fix
Use 'npx super-detype' or install globally with 'npm i -g super-detype'.
error TypeError: super-detype is not a function
cause Importing default export with require in CJS context.
fix
Use ESM import or use .default with require: const superDetype = require('super-detype').default
breaking v2.0.0 removed support for CommonJS. The package is now ESM-only.
fix Use dynamic import() or ensure your project is ESM. Do not use require().
deprecated v1.x global install usage is deprecated. Use npx or install v2 globally.
fix Use 'npx super-detype' or install the latest globally.
gotcha Paths with spaces must be quoted. On Windows, backslashes may cause issues.
fix Wrap paths in double quotes and use forward slashes on Windows.
gotcha The output directory is completely overwritten if it exists.
fix Always use a fresh output directory to avoid accidental data loss.
npm install super-detype
yarn add super-detype
pnpm add super-detype

Converts an entire TypeScript project at the given input path to a JavaScript project at the output path.

npx super-detype "/path/to/typescript-project" "/path/to/output"