You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a ulong property in a class that I am exposing to the ClearScript engine. The only issue is that rather than being capped at ulong.MaxValue, it is being capped at the js number max value, 2^53 - 1. I'm wondering if there's some way to represent the property as a BigInt in js, or to allow it to be set to a BigInt, as right now it gives an Error: Invalid property assignment if I attempt to.
The text was updated successfully, but these errors were encountered:
ClearScript has no support for BigInt at the moment. Even worse, since BigInt is a primitive rather than an object type, there's no way to marshal it to the host.
The only thing you can do right now is expose a property that returns the value as a string, and parse it into a BigInt in script code. Sorry!
We'll add BigInt support in the next ClearScript release.
I have a ulong property in a class that I am exposing to the ClearScript engine. The only issue is that rather than being capped at
ulong.MaxValue
, it is being capped at the js number max value,2^53 - 1
. I'm wondering if there's some way to represent the property as a BigInt in js, or to allow it to be set to a BigInt, as right now it gives anError: Invalid property assignment
if I attempt to.The text was updated successfully, but these errors were encountered: