{"library":"babel-plugin-syntax-typescript","type":"library","category":null,"description":"@babel/plugin-syntax-typescript is a core Babel plugin that enables Babel's parser to understand and parse TypeScript syntax without performing any transformations or type-checking. This plugin is essential for any Babel setup that needs to process TypeScript files, acting as the foundational layer for interpreting TypeScript-specific language features like type annotations, interfaces, and enums. It is typically used in conjunction with `@babel/plugin-transform-typescript` (or `@babel/preset-typescript`) for removing type annotations and transforming TypeScript code into standard JavaScript. The package is part of the actively developed Babel ecosystem, with `v7.29.2` being a recent stable release and `v8.0.0-rc.3` representing the upcoming major version, which includes significant breaking changes. Babel's release cadence is frequent, providing regular updates and security patches across both major versions. Key differentiators include its role in a highly configurable JavaScript transpilation pipeline and its ability to integrate with existing build tools, offering a performance advantage over `tsc` for pure transpilation by skipping type-checking.","language":"javascript","status":"active","version":"7.0.0-alpha.19","tags":["javascript","babel-plugin","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install babel-plugin-syntax-typescript","imports":["{ \"plugins\": [\"@babel/plugin-syntax-typescript\"] }","import { transformSync } from '@babel/core';\n\nconst code = `const x: string = 'hello';`;\nconst output = transformSync(code, {\n  plugins: ['@babel/plugin-syntax-typescript'],\n  filename: 'input.ts' // Important for Babel to infer syntax\n});\nconsole.log(output.code);","import { transformSync } from '@babel/core';\n\nconst code = `interface MyInterface { name: string; }\nconst x: MyInterface = { name: 'world' };`;\nconst output = transformSync(code, {\n  presets: ['@babel/preset-typescript'],\n  filename: 'input.ts'\n});\nconsole.log(output.code); // Should output 'const x = { name: 'world' };'"]},{"cmd":"yarn add babel-plugin-syntax-typescript","imports":[]},{"cmd":"pnpm add babel-plugin-syntax-typescript","imports":[]}],"homepage":"https://babeljs.io","github":"https://github.com/babel/babel","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/babel-plugin-syntax-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-plugin-syntax-typescript/compatibility"}}