### 💻 - [ ] Would you like to work on a fix? ### How are you using Babel? Programmatic API (`babel.transform`, `babel.parse`) ### Input code ```ts class Foo { accessor prop: string = 1; } ``` ### Configuration file name _No response_ ### Configuration https://babeljs.io/repl#?browsers=&build=&builtIns=false&corejs=3.6&spec=false&loose=false&code_lz=MYGwhgzhAEBiD29oG8BQ0PTMYBTK8ATtAA6HwkBc0EALoQJYB2A5tALzQCMA3KgL6ogA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=true&fileSize=true&timeTravel=false&sourceType=module&lineWrap=true&presets=stage-2%2Cstage-3%2Ctypescript&prettier=true&targets=&version=7.20.4&assumptions=%7B%7D ### Current and expected behavior Current: ``` /repl.ts: Missing semicolon. (2:17) 1 | class Foo { > 2 | accessor prop: string = 1; | ^ 3 | } 4 | ``` Expected: parses fine as it's [valid TS syntax](https://www.typescriptlang.org/play?ts=4.9.3#code/MYGwhgzhAEBiD29oG8CwAoaXpmMAplPAE7QAOx8ZAXNBAC7ECWAdgObQC80A5GDwG4MAXwxA) ### Environment Website ### Possible solution Add support for type annotations on auto-accessors when parsing TS ### Additional context It looks like there [is support for TS modifiers including `abstract`](https://babeljs.io/repl#?browsers=&build=&builtIns=false&corejs=3.6&spec=false&loose=false&code_lz=MYGwhgzhAEBiD29oG8BQ1oAcCuAjEAlsNGMMAKZTwBOW18mAjNALzSMDc6dBAbmABdyJMpQg06DAEyt2XDJnpDgQgCYiKVWooYBmWZ24QBgohrESdmACwH5WPIWLHTxUpvHb6mAKx3UAL6oqGC4xtSkAtCgkDAAQmC0aBih4ZHmWpKYXAFAA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=true&fileSize=true&timeTravel=false&sourceType=module&lineWrap=true&presets=stage-2%2Cstage-3%2Ctypescript&prettier=true&targets=&version=7.20.4&assumptions=%7B%7D), but type annotations are not allowed
💻
How are you using Babel?
Programmatic API (
babel.transform,babel.parse)Input code
Configuration file name
No response
Configuration
https://babeljs.io/repl#?browsers=&build=&builtIns=false&corejs=3.6&spec=false&loose=false&code_lz=MYGwhgzhAEBiD29oG8BQ0PTMYBTK8ATtAA6HwkBc0EALoQJYB2A5tALzQCMA3KgL6ogA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=true&fileSize=true&timeTravel=false&sourceType=module&lineWrap=true&presets=stage-2%2Cstage-3%2Ctypescript&prettier=true&targets=&version=7.20.4&assumptions=%7B%7D
Current and expected behavior
Current:
Expected:
parses fine as it's valid TS syntax
Environment
Website
Possible solution
Add support for type annotations on auto-accessors when parsing TS
Additional context
It looks like there is support for TS modifiers including
abstract, but type annotations are not allowed