-
Notifications
You must be signed in to change notification settings - Fork 37
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
feat: WIP enums implementation #374
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember that const enum
and enum
are compiled differently. I wonder if there are any TypeScript tests we could run for enums? Anyways here's the documentation for how enums are compiled.
Co-authored-by: Elias Sjögreen <[email protected]>
Quick question: does this mean Nova is attempting to support most/all TypeScript syntax? e.g. is native namespace support planned? |
the idea is to make it a feature not enabled by default |
My thinking is that Rust feature flags shall be our friends. I'm planning on writing a blog post about this as well, but TypeScript support at the parsing level (at least) is the first one of our supported feature flags. There hasn't really been a direct discussion on this, but most likely TS support will not include any optimisation based on types, not at least for the foreseeable future. Our bytecode machine doesn't really give much in the way of type based optimisations in the first place. But our parser, oxc's parser, supports TS out of the box and for us supporting TS mostly just means skipping the type declarations. As a result, it's an easy feature to support. Side note: In no particular order, other feature flags I'm thinking about:
|
Enums support only when using the typescript flag