Answer the question
In order to leave comments, you need to log in
Why can't react native with typescript compile because of ENUM?
When compiling, it gives the following error:
error: bundling failed: SyntaxError: /home/vacoo/www/vodopad/app_client/src/resources/core/index.tsx: enum is a reserved word (4:0)
2 | import Helpers from "./helpers";
3 |
> 4 | export enum NetworkRequestStatus {
| ^
5 | REQUEST = "request",
6 | SUCCESS = "success",
7 | FAILED = "failed"
Add @babel/plugin-proposal-export-default-from (https://git.io/vb4yH) to the 'plugins' section of your Babel config to enable transformation.
at _class.raise (/home/vacoo/www/vodopad/app_client/node_modules/@babel/parser/lib/index.js:3939:15)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question