{"id":26449,"library":"super-detype","title":"super-detype","description":"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.","status":"active","version":"2.2.2","language":"javascript","source_language":"en","source_url":"https://github.com/Super-Kenil/super-detype","tags":["javascript","converter","typescript","typescript-to-javascript","compiler"],"install":[{"cmd":"npm install super-detype","lang":"bash","label":"npm"},{"cmd":"yarn add super-detype","lang":"bash","label":"yarn"},{"cmd":"pnpm add super-detype","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Used as the engine to strip TypeScript types and transpile.","package":"@babel/core","optional":false},{"reason":"Babel preset required for TypeScript transform.","package":"@babel/preset-typescript","optional":false},{"reason":"CLI argument parsing.","package":"commander","optional":false},{"reason":"Enhanced file system operations (copy, remove).","package":"fs-extra","optional":false}],"imports":[{"note":"Package is ESM-only since v2.0.0. Use import syntax.","wrong":"const superDetype = require('super-detype')","symbol":"default","correct":"import superDetype from 'super-detype'"},{"note":"convertProject is a named export. Default export is the main convert function.","wrong":"import convertProject from 'super-detype'","symbol":"convertProject","correct":"import { convertProject } from 'super-detype'"},{"note":"Without global install, use npx. With global install, the CLI command is 'super-detype'.","wrong":"super-detype <input> <output>","symbol":"CLI","correct":"npx super-detype <input> <output>"}],"quickstart":{"code":"npx super-detype \"/path/to/typescript-project\" \"/path/to/output\"","lang":"typescript","description":"Converts an entire TypeScript project at the given input path to a JavaScript project at the output path."},"warnings":[{"fix":"Use dynamic import() or ensure your project is ESM. Do not use require().","message":"v2.0.0 removed support for CommonJS. The package is now ESM-only.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use 'npx super-detype' or install the latest globally.","message":"v1.x global install usage is deprecated. Use npx or install v2 globally.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Wrap paths in double quotes and use forward slashes on Windows.","message":"Paths with spaces must be quoted. On Windows, backslashes may cause issues.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Always use a fresh output directory to avoid accidental data loss.","message":"The output directory is completely overwritten if it exists.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'npx super-detype' or install globally with 'npm i -g super-detype'.","cause":"Trying to require() the package without global install or npx.","error":"Error: Cannot find module 'super-detype'"},{"fix":"Use ESM import or use .default with require: const superDetype = require('super-detype').default","cause":"Importing default export with require in CJS context.","error":"TypeError: super-detype is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}