Thanks to visit codestin.com
Credit goes to github.com

Skip to content

πŸ› Class member named "async" fails to parseΒ #7826

@albertxing

Description

@albertxing

Environment information

CLI:
  Version:                      2.1.2
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

What happened?

Biome fails to parse the class members named async (playground):

class Connection {
  public async: boolean = false;
}

Results in two parsing errors

Expected an identifier, a string literal, a number literal, a private field name, or a computed name but instead found ':'.
Expected a class method body but instead found '='.

Expected result

The parse should not error as this is valid TypeScript (tslang playground)

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ParserArea: parserL-JavaScriptLanguage: JavaScript and super languagesS-Bug-confirmedStatus: report has been confirmed as a valid bug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions