-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
area: typescriptoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
💻
- Would you like to work on a fix?
How are you using Babel?
@babel/cli
Input code
class A {
test() {
}
}
class B extends A {
override test() {
}
}Configuration file name
babel.config.js
Configuration
module.exports = {
presets: [
["@babel/preset-typescript", { "allowDeclareFields": true }],
["@babel/preset-env", {
"targets": {
"node": true
}
}]
]
};Current and expected behavior
Current output:
"use strict";
class A {
test() {}
}
class B extends A {
override test() {}
}Expected output:
"use strict";
class A {
test() {}
}
class B extends A {
test() {}
}Environment
System:
OS: Linux 5.4 Linux Mint 20 (Ulyana)
Binaries:
Node: 14.16.1 - ~/.nvm/versions/node/v14.16.1/bin/node
Yarn: 1.22.5 - /usr/bin/yarn
npm: 7.11.2 - ~/.nvm/versions/node/v14.16.1/bin/npm
Possible solution
Remove the "override" modifier when transforming to JavaScript.
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: typescriptoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue