{"id":16558,"library":"typescript-transpile-only","title":"TypeScript Transpile Only CLI","description":"typescript-transpile-only (version 0.0.4) is a command-line interface utility that wraps the TypeScript compiler (`tsc`) to perform transpilation without type checking. Its primary purpose is to allow developers to convert TypeScript code into JavaScript, enforcing only syntax correctness while ignoring semantic (type) errors. This tool is particularly useful for projects undergoing a gradual migration from JavaScript to TypeScript, or for teams where immediate resolution of all type errors is not feasible or desired, enabling a softer transition. The package's author notes it was a \"1 hour hack,\" indicating a minimal development effort and implying an irregular or non-existent release cadence. Its key differentiator is this focused `transpile-only` behavior without the complexities or overhead of full `tsc` type-checking, enabling a softer transition path for projects with existing type errors.","status":"maintenance","version":"0.0.4","language":"javascript","source_language":"en","source_url":"https://github.com/cspotcode/typescript-transpile-only","tags":["javascript","TypeScript","transpile-only","transpile","compile","downlevel"],"install":[{"cmd":"npm install typescript-transpile-only","lang":"bash","label":"npm"},{"cmd":"yarn add typescript-transpile-only","lang":"bash","label":"yarn"},{"cmd":"pnpm add typescript-transpile-only","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for performing the actual TypeScript transpilation.","package":"typescript","optional":false}],"imports":[],"quickstart":{"code":"npm install typescript-transpile-only\nnpm install typescript\n\n# Run the transpile-only compiler on your project\ntsc-transpile-only --project .\n\n# Example: Transpile a single file\n# tsc-transpile-only my-file.ts --outDir dist\n\n# Example: To replicate a --build like behavior for multiple projects\n# tsc-transpile-only --project ./packages/my-lib\n# tsc-transpile-only --project ./packages/my-app","lang":"shell","description":"Demonstrates installation and basic usage, showing how to invoke the CLI for a project."},"warnings":[{"fix":"Evaluate this tool's suitability for your specific use case. For robust production transpilation, consider `tsc` with `noEmitOnError: false` and `isolatedModules: true` or a build tool like Babel with `@babel/preset-typescript` if type-checking is handled separately.","message":"The package author explicitly states this is a \"1 hour hack\" with \"No tests\" and recommends using it \"at your own risk.\" It may not be suitable for production-critical workflows or environments requiring high stability.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"For `--build`, manually invoke `tsc-transpile-only` multiple times for individual projects or use a custom script. Other unsupported flags have no direct workaround within this specific tool.","message":"Several standard `tsc` CLI flags, including `--build`, `--help`, `--version`, and `--all`, are not supported by `tsc-transpile-only`.","severity":"breaking","affected_versions":">=0.0.1"},{"fix":"Adjust any scripts or CI/CD pipelines that rely on specific `tsc` exit codes to handle a generic failure code of 1 from `tsc-transpile-only`.","message":"Exit codes for `tsc-transpile-only` do not align with `tsc`'s detailed error codes. It uses exit code 1 for all failures (e.g., syntax errors) and 0 for success, rather than specific codes for different failure reasons.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"last_verified":"2026-04-22T00:00:00.000Z","next_check":"2026-07-21T00:00:00.000Z","problems":[{"fix":"Consult the `typescript-transpile-only` documentation for supported flags. For `--build`, you will need to invoke `tsc-transpile-only` for each project directory individually.","cause":"Attempting to use `tsc` specific flags, such as `--build`, that are not implemented or supported by `tsc-transpile-only`.","error":"Unknown option: --build"},{"fix":"Install `typescript` in your project: `npm install typescript`.","cause":"The `typescript` package, which is a peer dependency, is not installed alongside `typescript-transpile-only`.","error":"Error: Cannot find module 'typescript' or Error: Cannot find 'typescript'"},{"fix":"Modify your shell scripts or CI/CD configurations to check for a generic exit code of 1 for any failure, rather than relying on specific `tsc` error codes.","cause":"`tsc-transpile-only` uses a generic exit code of 1 for all failures (syntax errors), unlike `tsc` which provides more specific non-zero error codes.","error":"Process exited with code 1 (when expecting a specific `tsc` error code)"}],"ecosystem":"npm"}