Skip to content

Conversation

@CodesbyRobot
Copy link

static equal = (attribute, value) =>
^

SyntaxError: Unexpected token =

static equal = (attribute, value) =>
               ^

SyntaxError: Unexpected token =
@CodesbyRobot
Copy link
Author

static equal = (attribute, value) => ^

SyntaxError: Unexpected token =

Incorrectly set static property.

@lohanidamodar
Copy link
Member

lohanidamodar commented Mar 23, 2022

@CodesbyRobot Can you please mention the nodejs version you are using that's giving the issue?

@CodesbyRobot
Copy link
Author

Node 10.19.0

@Meldiron
Copy link
Contributor

Meldiron commented Apr 7, 2022

Hey there 👋

  • I can confirm our current syntax does not work in Node 10.x. I can also confirm your syntax will work on 0.10, AND new newer versions
  • You marked all methods async, which is not required. Query is a utility class that takes input, and generated string. Everything is sync, we don't need to await them.
  • Make sure to add return statements into the methods, because with this new syntax, a return keyword is required. Example:
  static equal(attribute, value) {
    return Query.addQuery(attribute, "equal", value);
  }
  • Our SDK libraries are read-only, as they are automatically generated from our SDK generator. This helps us automate 90% of maintenance, and keep the remaining 10% in one place. Could you please look at this repository and try to apply these changes there? The same changes might be valuable for Deno and Web SDKs.

Happy to help if you have any questions or concerns 😇

@stnguyen90
Copy link
Contributor

Closing because of Matej's comments and this is stale now.

@stnguyen90 stnguyen90 closed this Nov 2, 2022
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

Successfully merging this pull request may close these issues.

4 participants