ts-babel (v6.1.7) transforms the output of the TypeScript compiler using Babel for fine-grained control over target environments. It acts as a bridge between TypeScript's compilation and Babel's polyfill and syntax transformation capabilities, allowing projects to use TypeScript for type checking and modern syntax while leveraging Babel for cross-browser compatibility. Key differentiator: avoids duplicate parsing by feeding TypeScript's emit directly into Babel, preserving source maps. Maintenance status unknown (last release likely older). Requires TypeScript ^3.5.2 as a peer dependency and Node >=8.10.0.
npm install ts-babelNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
This shows how to compile a TypeScript file with ts-babel: takes TS code, compiles with TypeScript, then transforms with Babel preset-env for browser compatibility.
Use a version of ts-babel that supports TypeScript >=4.0 or switch to a different tool (e.g., @babel/preset-typescript).
Migrate to @babel/preset-typescript and drop ts-babel dependency.
Use require('ts-babel').default or enable esModuleInterop in tsconfig.Always use .then() or await when calling tsBabel() or transform().
npm install typescript@^3.5.2
Use require('ts-babel').default or import tsBabel from 'ts-babel'.npm install @babel/core