-
Notifications
You must be signed in to change notification settings - Fork 3
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
SyntaxError: Unexpected token . #3
Comments
@YodaLightsabr Hey, thats is a new JS feature. Your Node.JS may be outdated so it does not support that. You will have to update node.js |
How new is it? |
This makes absolutely no sense. And if you only use it here, it would make sense to use a slightly longer syntax to support a node version that isnt even that old. |
const language = this.languages.get(teamId) || (team || {}).locale || 'en_US'; |
if |
@YodaLightsabr A better solution to support older node is to change the target version of tsconfig. Remember, TS can compile this latest code into older code which i am more open to. I don't want to intentionally make the libs code worse just so it can support super old versions of node. gapi will always use the latest and greatest code in it's own code. The generated JavaScript I am open to modifying. Please can you recommend me which would work for your needs and you can even send a PR to change the target https://github.com/Skillz4Killz/gapi/blob/master/tsconfig.json#L7 Please note that any older version could come with slower performance, potential bugs and more. It's always best to use latest code imo. |
Yes, it is, but supporting version 12.16.1, which was only about a year ago, does not seem unreasonable. People will be unable to use this package on Replit.com, which is always a little behind on updating Node.js, if you're always using the latest features to save 10 characters of code writing. |
@YodaLightsabr I am open to allowing this to support older node version. I want to change the JS target for the TS compiler. It will compile to any older nodejs version you need. Currently, i use es2020 because that is the latest but if you need something older please tell me which you need so we roll it back to that version. I don't use replit so you will have to look into which target version is right for this and i can change it for you with that information. The different supported versions are listed in that link i shared in the last comment. |
What's that all about?
The text was updated successfully, but these errors were encountered: