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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Pattern 馃] Unknown enum-like pattern #69

Open
pionxzh opened this issue Dec 6, 2023 · 2 comments
Open

[Pattern 馃] Unknown enum-like pattern #69

pionxzh opened this issue Dec 6, 2023 · 2 comments
Labels
discussion help wanted Extra attention is needed

Comments

@pionxzh
Copy link
Owner

pionxzh commented Dec 6, 2023

I noticed a pattern that looks like an enum but is much simpler. And TS Enum does not support boolean as the value.

The code was probably generated by some tools, as most people shouldn't write code like this.

Not sure what's this 馃

var n =
  ((a = {}),
  (a[34] = true),
  (a[20] = true),
  (a[31] = true),
  (a[22] = true),
  (a[71] = true),
  a
);
@pionxzh pionxzh added help wanted Extra attention is needed discussion labels Dec 6, 2023
@pionxzh pionxzh changed the title [Pattern] Unknown enum-like pattern [Pattern 馃] Unknown enum-like pattern Dec 6, 2023
@0xdevalias
Copy link

I noticed a pattern that looks like an enum but is much simpler.

@pionxzh Curious if you have seen this come up multiple times? And if so, if you have any larger examples of it (where we could explore the surrounding code/usages to try and determine the origin)

@pionxzh
Copy link
Owner Author

pionxzh commented May 6, 2024

I only saw this pattern in 1 script. I'm afraid that I couldn't share that script content here. Let me try extracting the critical part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants