-
-
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 issuepkg: parser
Description
Bug Report
Current Behavior
Babel throws Unexpected token, expected "(" when encounters this piece of code:
class A extends B {
async method?(val: string): Promise<void>;
^
}Expected behavior/code
This code should be parsed successfully
Babel Configuration (.babelrc, package.json, cli command)
module.exports = {
presets: [
[
'@babel/preset-env',
{
targets: {
node: 'current',
},
},
],
'@babel/preset-typescript',
],
ignore: ['node_modules'],
};Environment
- Babel version(s): 7.4.0
- Node/npm version: 10.16.3
- OS: Windows 10
- Monorepo: no
- How you are using Babel: cli
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 issuepkg: parser