Registry / devops / typescript-transpile-only

typescript-transpile-only

JSON →
library0.0.4jsnpmunverified

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.

npm install typescript-transpile-only
INSTALL
IMPORT
SIG · TYPESCRIPT-TRANSPI
T
typescript-transpile-only
devopsjavascriptv0.0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Demonstrates installation and basic usage, showing how to invoke the CLI for a project.

npm install typescript-transpile-only npm install typescript # Run the transpile-only compiler on your project tsc-transpile-only --project . # Example: Transpile a single file # tsc-transpile-only my-file.ts --outDir dist # Example: To replicate a --build like behavior for multiple projects # tsc-transpile-only --project ./packages/my-lib # tsc-transpile-only --project ./packages/my-app
typescript-transpile-only --version
Debug
Known issues
gotchaThe 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.
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.
affects: >=0.0.1
breakingSeveral standard `tsc` CLI flags, including `--build`, `--help`, `--version`, and `--all`, are not supported by `tsc-transpile-only`.
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.
affects: >=0.0.1
gotchaExit 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.
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`.
affects: >=0.0.1
Errors
Common errors & fixes
Unknown option: --build
Attempting to use `tsc` specific flags, such as `--build`, that are not implemented or supported by `tsc-transpile-only`.
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.
Error: Cannot find module 'typescript' or Error: Cannot find 'typescript'
The `typescript` package, which is a peer dependency, is not installed alongside `typescript-transpile-only`.
fix
Install `typescript` in your project: `npm install typescript`.
Process exited with code 1 (when expecting a specific `tsc` error code)
`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.
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.
Upgrade
Version history
0.0.4latest on npm
Audit
Dependencies
typescriptrequiredRequired for performing the actual TypeScript transpilation.
Agent activity
2 hits · last 30 days
node
2
Resources
typescript-transpile-only — npm install typescript-transpile-only · libregistry