facebook / hermes

A JavaScript engine optimized for running React Native.

Home Page:https://hermesengine.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: Improved error `async arrow functions are unsupported`

leotm opened this issue · comments

Problem

async arrow functions (ignored by Babel) trigger Hermes error

AF->getSourceRange(), Twine("async functions are unsupported"));

causing ./gradlew :app:installRelease to fail
after Metro finishes bundling

Solution

it would be great if Hermes would output instead

async arrow functions are unsupported

Additional Context

  • #1208

    The good news is that we will be releasing a beta version of Hermes supporting most ES6+ features in 2024 Q1, so at that time none of these plugins will be necessary.

  • #1389

nb: i think Static Hermes will be supporting arrow functions too

That is a good point. So, basically we need to make the error message more specific. Can you please submit a PR for this?