This type is an adapter type around u64 and i64 as understood in AssemblyScript.
The goal is for it to encapsulate how this gets represented "over the wire".
As of now we use GraphQL, which only gives us Int, or a 32 bit wide signed integer.
This implementation will fallback to a string representation of the value if it would overflow the i32.
These types are intended only for that very purpose. As such they don't have any operator overloads or any other
additional support than a constructor and a matching getter #value to retrieve the primitive type.
We expect users to not rely on these adapter types for anything else than transferring data in and
out of the AssemblyScript runtime.
Note: Values passed to this that are out of bounds for the given type T will result in undefined behaviour.
For example, passing a negative number to OverflowableInteger.
This type is an adapter type around u64 and i64 as understood in AssemblyScript. The goal is for it to encapsulate how this gets represented "over the wire".
As of now we use GraphQL, which only gives us
Int
, or a 32 bit wide signed integer. This implementation will fallback to a string representation of the value if it would overflow the i32.These types are intended only for that very purpose. As such they don't have any operator overloads or any other additional support than a constructor and a matching getter
#value
to retrieve the primitive type. We expect users to not rely on these adapter types for anything else than transferring data in and out of the AssemblyScript runtime.Note: Values passed to this that are out of bounds for the given type T will result in undefined behaviour. For example, passing a negative number to OverflowableInteger.