Private fields Don't Work in Javascript #5158
Unanswered
Errorbot1122
asked this question in
Q&A
Replies: 1 comment 5 replies
-
Hey The issue here is that we don't support private methods by default you will need to add a babelrc and install the plugins required like so: https://codesandbox.io/s/question-private-fields-forked-riu3t?file=/src/index.js Unfortunatly eslint still complains and I will take a look at that but now seems to work |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Whenever I try to run a class with a private var it says this:
SyntaxError: [FileLocation]: Unexpected character '#' ([Row]:[Col])
Code:
and also, Whenever I try to run a class with a private method it says this:
Parsing error: This experimental syntax requires enabling the parser plugin: 'classPrivateMethods'
Code:
What do I do to fix
Explantion Sandbox
Beta Was this translation helpful? Give feedback.
All reactions