npm / @babel/plugin-syntax-typescript
@babel/plugin-syntax-typescript
What changed in @babel/plugin-syntax-typescript 8, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-26.
20 breaking3 new APIs and options2 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@babel/plugin-syntax-typescript 825 changes
Breaking changes 20
All presets and plugins require @babel/core@^8.0.0 as a peer dependency; Babel 7 combinations are not officially supported.
BigIntLiteral.value is a bigint instead of a string, aligning it with NumericLiteral; JSON.stringify cannot serialize bigint.
TSParenthesizedType is no longer generated unless createParenthesizedExpression is enabled; node.extra.parenthesized can indicate parentheses when it is false.
Babel is shipped as native ECMAScript modules, affecting how projects load Babel packages.
Dynamic import() is represented by an ImportExpression node instead of a CallExpression; createImportExpressions: false retains the legacy AST.
Importing internal files is disallowed; use the exported API only.
The isTSX option has been removed. Remove it from configuration and enable @babel/plugin-syntax-jsx when JSX syntax is needed.
Babel 8 packages require Node.js ^22.18.0 || >=24.11.0, so the plugin will not run on older Node versions.
The parameters field is renamed to params on TSCallSignatureDeclaration, TSConstructSignatureDeclaration, TSFunctionType, TSConstructorType, and TSMethodSignature.
The typeAnnotation field is renamed to returnType on TSCallSignatureDeclaration, TSConstructSignatureDeclaration, TSFunctionType, TSConstructorType, and TSMethodSignature.
ClassDeclaration and ClassExpression use superTypeArguments instead of superTypeParameters.
Class implements entries use TSClassImplements instead of TSExpressionWithTypeArguments; type arguments use typeArguments.
TSEnumDeclaration members are wrapped in a TSEnumBody node.
An exported TSImportEqualsDeclaration is parsed inside an ExportNamedDeclaration, and its isExport field is removed.
TSImportType.argument is renamed to source.
Interface extends entries use TSInterfaceHeritage instead of TSExpressionWithTypeArguments; type arguments use typeArguments.
TSMappedType flattens typeParameter into key and constraint properties on the node.
A dotted namespace name such as namespace X.Y is represented by one TSModuleDeclaration whose name is a TSQualifiedName, rather than nested declarations.
TSTypeParameter.name is an Identifier node instead of a plain string, aligning the AST with @typescript-eslint.
typeParameters is renamed to typeArguments on CallExpression, JSXOpeningElement, NewExpression, OptionalCallExpression, TSImportType, TSInstantiationExpression, TSTypeQuery, and TSTypeReference.
New APIs and options 3
When both estree and typescript parser plugins are enabled, Babel creates TSAbstractMethodDefinition nodes.
When both estree and typescript parser plugins are enabled, Babel creates TSPropertyDefinition nodes.
Interpolated template literal types produce TSTemplateLiteralType nodes; types without interpolated positions retain their existing AST shape.
Fixes and other changes 2
Removes isTSX from the plugin's types, correcting the TypeScript declarations.
TSTypeQuery.exprName can be a ThisExpression for typeof this, rather than an Identifier named this.