-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
outdatedA 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
💻
- Would you like to work on a fix?
How are you using Babel?
Programmatic API (babel.transform
, babel.parse
)
Input code
class Foo {
accessor prop: string = 1;
}
Configuration file name
No response
Configuration
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
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
Metadata
Metadata
Assignees
Labels
outdatedA 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