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

handle all type of symbols as legal js literal #81

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

GHolk
Copy link

@GHolk GHolk commented Aug 13, 2023

  • well-known symbol are format like Symbol.iterator
  • global registried symbol are format like Symbol.for('name')
  • other symbol are format like Symbol('unique symbol')

close #80.

@GHolk
Copy link
Author

GHolk commented Aug 13, 2023

Test fail because xo fail. I don't know xo, and it failed on the original branch on my pc too.
But npx ava pass, and I fix and add a test case for all symbol types.

I saw a old pr #34 about symbol, but it is only partial support, and the output is illegal js.

* well-known symbol are format like `Symbol.iterator`
* global registried symbol are format like `Symbol.for('name')`
* other symbol are format like `Symbol('unique symbol')`
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.

Support symbol literal
1 participant