Skip to content

(js) Async arrow function should be highlighted as function #3405

@jebarjonet

Description

@jebarjonet

Describe the issue
Async arrow function should be highlighted as function, instead it is not highlighted at all. This is the most used shape for functions in modern Javascript syntax (instead of function name() {})

Which language seems to have the issue?
js / ts

Are you using highlight or highlightAuto?
highlight specifically asking for javascript language

Sample Code to Reproduce

In the examples below, init is a function name. The function is declared as arrow function in Javascript.

✅ Example without async (works well) :

const init = () => {
  // something
}

Screen Shot 2021-11-21 at 22 31 56

Screen Shot 2021-11-21 at 22 31 56

❌ Example with async (does not recognize function name) :

const init = async () => {
  // something
}

Screen Shot 2021-11-21 at 22 32 35

Screen Shot 2021-11-21 at 22 32 30

Expected behavior
The presence or absence of async should not change function identification. In the example above, init should be colored blue in both cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions