Skip to content
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

JSDefender throws parsing error for public fields? #48

Open
LRagji opened this issue Aug 21, 2024 · 0 comments
Open

JSDefender throws parsing error for public fields? #48

LRagji opened this issue Aug 21, 2024 · 0 comments

Comments

@LRagji
Copy link

LRagji commented Aug 21, 2024

Not sure if this is the correct repo to raise this defect, but stuck on it for sometime
I have example.js file

export class Server {
    props = "abc"
}

Then i run

jsdefender --license ./example.js ./exampleO.js --estarget es2020

Which gives me parsing error as below

PreEmptive Protection JSDefender(TM)
Copyright 2019-2024 PreEmptive Solutions, LLC. All Rights Reserved
Use of this software constitutes acceptance of the accompanying license agreement.
Info: JSDefender version 2.7.0
Info: Licensed to: 
Floating Build License:
This software may be used on binaries for general release.Concurrent Build Limit: 8
Info: JSDefender is up to date.
Info: Source tree building in progress...
Error: Parse error found in 1 source code script.
Execution time: 1s 867ms

Now i understand that my JS file is with correct definition of ES specs: MDN then what is this parse errors...

The same error pops up for private fields as well # preceded.

Following code works:

export class Server {
    constructor()
    {
        this.props = "abc";
    }
}

What am i doing wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant