{"library":"babel-preset-typescript","type":"library","category":null,"description":"`@babel/preset-typescript` is a Babel preset specifically designed to strip TypeScript syntax from source code, converting it into standard JavaScript. It does not perform any type checking; its sole purpose is to remove type annotations, enums, and other TypeScript-specific constructs so that Babel can continue processing the resulting JavaScript. This allows developers to leverage Babel's extensive plugin ecosystem for further transformations, such as targeting older JavaScript environments with `@babel/preset-env` or integrating JSX transformations. The package is part of the Babel monorepo, maintaining an active release schedule with frequent patch and minor updates (often bi-weekly) and new major versions released periodically. As of April 2026, the `7.x` series is stable, with `7.29.2` being a recent patch, while the `8.x` series is in a release candidate phase, with `8.0.0-rc.3` being the latest. Its primary differentiator is enabling a unified transformation pipeline for projects using TypeScript in conjunction with various Babel features that the TypeScript compiler alone does not provide.","language":"javascript","status":"active","version":"7.0.0-alpha.19","tags":["javascript","babel-preset","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install babel-preset-typescript","imports":["{\n  \"presets\": [\n    \"@babel/preset-typescript\"\n  ]\n}","// babel.config.js\nmodule.exports = {\n  presets: [\n    ['@babel/preset-typescript', {\n      // options for the preset\n      is='value'\n    }]\n  ]\n};","import * as babel from '@babel/core';\n\nconst code = `const x: number = 42;`;\nconst result = await babel.transformAsync(code, {\n  filename: 'input.ts', // Important for preset to recognize TS\n  presets: [\n    ['@babel/preset-typescript', { allowDeclareFields: true }],\n    ['@babel/preset-env', { targets: { node: 'current' } }]\n  ]\n});\nconsole.log(result?.code);"]},{"cmd":"yarn add babel-preset-typescript","imports":[]},{"cmd":"pnpm add babel-preset-typescript","imports":[]}],"homepage":null,"github":"https://github.com/babel/babel","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/babel-preset-typescript","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/babel-preset-typescript/compatibility"}}