-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fat arrow Unexpected token in the Class #909
Comments
This is because of class properties that are currently on stage 3 of ECMA proposal and does not support by acorn and escodegen |
@iterion-mikehit you should use methods, like: class Kruzya {
// ...
test() {console.log("test")}
} second way: class Kruzya {
constructor() {
this.setScreen = () => {console.log("test")}; // typo but should work
}
} |
Thank you I have a more complex JS code unfortunately rewrite it |
Now this proposal in stage 4. Acorn just has added the support of this feature, but |
I forked After that, I'll try to implement this feature in my fork of |
PR with the support of this feature in my fork of |
WIP PR to the obfuscator: Still need to wait until will be finished. |
I'm having the same problem. I'm trying to obfuscate several classes all of which have arrow function methods. In each file, the obfuscator reaches the first arrow function and throws this Error: ERROR at line 24: Unexpected token (24:18) An example of the smallest class
Is the message here, we're waiting on...? Sorry to hassle you |
PR to the @types/estree |
Any update on this? |
I linked all related PR's. We have to wait until they all will be merged. |
Could we please merge the PR: #916? Thank you! |
This PR cannot be merged right now. Wait until eslint/eslint-scope#71 will be merged |
Released as |
Hi, try this to obfuscatge with online obfuscator. Any idea why error is raising?
class alfaTest{
constructor() {
let test = {}
}
setScreen = () => {
console.log('test');
}
}
Raise an error
Error: ERROR at line 5: Unexpected token (5:14)
The text was updated successfully, but these errors were encountered: