Hello!
Unfortunately
ClearScript does have a scheme in place that makes JavaScript equality comparison work for .NET enum values. It's somewhat memory intensive, but that's offset by the tiny value range of most enums. In theory the same technique could work for other value types, but currently it's enabled only for enums due to memory consumption concerns.
Thanks!
Unfortunately
valueOf
isn't used to prepare values for equality comparison, nor is it possible for the host to overload JavaScript operators. And as you probably know, comparing structs by reference doesn't even work for managed code :)ClearScript does have a scheme in place that makes JavaScript equality comparison work for .NET enum values. It's somewhat memory intensive, but that's offset by the tiny value range of most enums. In theory the same technique could work for other value types, but currently it's enabled only for enums due to memory consumption concerns.
Thanks!