Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.1.1
Description
Unfortunately, javascript does not have the concept of enumerations, and it has been a long term issue. People came up with several suboptimal workarounds, but those feel like workarounds, i.e. sometimes you can modify the integer, which is not typical for an enumeration and so forth.
Now, that v4 has been integrated a month ago or so, it might be simpler to establish such a feature without much overhead, i.e. almost no-op.
The syntax would need to be discussed, but it would be simple like: enumProperty: MyEnumType(myInt)
There could be a method in JS that does the casting, and its bulk coming from the C++ side.