💻
How are you using Babel?
Programmatic API (babel.transform, babel.parse)
Input code
const source = `
abstract class Foo extends FooBase {
abstract override bar(): any;
}
`;
const result = babel.transformSync(source, {
plugins: [require.resolve('@babel/plugin-syntax-typescript')],
});
if (result) {
console.log(result.code);
}
Configuration file name
No response
Configuration
No response
Current and expected behavior
Current output:
abstract class Foo extends FooBase {
override abstract bar(): any;
}
It's illegal to put override before abstract
Expected output:
abstract class Foo extends FooBase {
abstract override bar(): any;
}
Environment
"@babel/core": "^7.17.10",
"@babel/plugin-syntax-typescript": "^7.25.9",
Possible solution
No response
Additional context
No response
💻
How are you using Babel?
Programmatic API (
babel.transform,babel.parse)Input code
Configuration file name
No response
Configuration
No response
Current and expected behavior
Current output:
It's illegal to put override before abstract
Expected output:
Environment
"@babel/core": "^7.17.10",
"@babel/plugin-syntax-typescript": "^7.25.9",
Possible solution
No response
Additional context
No response