-
Notifications
You must be signed in to change notification settings - Fork 388
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
ES6 class support #349
Milestone
Comments
Thanks for all your hard work first of all! do we have an eta for the es6 support? |
I can only say it's next on my list. It's no small feat and I also want to implement private fields so that I don't have to return to it (and potentially do a complete rewrite). |
Gabri3l
pushed a commit
to mongodb-forks/goja
that referenced
this issue
Sep 1, 2022
(cherry picked from commit 0b5d210)
Gabri3l
added a commit
to mongodb-forks/goja
that referenced
this issue
Mar 22, 2023
* Implemented classes (including private elements). Closes dop251#349. * Fixed "delete 'a'.prop". Optimised a[<const_string>] to a.<const_string> * Enabled more tests and fixed some bugs. Closes dop251#410. * Fixed this binding initialisation. Fixes dop251#415. * Added NewSharedDynamicObject() and NewSharedDynamicArray(). Closes dop251#418. * Optimised memory usage when generating function and class initialisation code * Fixed Export() value for arrow functions and classes. Added Runtime.AssertConstructor. Closes dop251#419. * Always create a map when exporting. Fixes dop251#422. * Refactored conversion to primitive. Always use `String()` method if defined. Closes dop251#423.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @dop251, thanks for all your hard work on Goja. I'm especially grateful for the recent Promise API support.
Goja is really close to being ready to natively run what ESBuild outputs to ES6 via
esbuild --target=es2015 <entry...>
.One thing that's missing is class support:
I was actually surprised to see that class support came in ES6, but I had a look at the ES6 support table and it looks like it's there.
For my use-case, I'm trying to render Svelte code on the server-side, but the compiler generates classes:
The text was updated successfully, but these errors were encountered: