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
In order to create top level arrays, or objects, or to place an element in an array, one needs to pass in null for the key. However, with the typing definitions for assemblyscript-json, and the default tsconfig for assemblyscript proper, null is not a valid argument to these functions
Current Solution
For right now, you can use changetype<string>(0) to get around this.
Suggested Solution
It would be nice to have all of the name types to be alternated with null.
The text was updated successfully, but these errors were encountered:
I think all non-primitive types in AssemblyScript can be alternated with null. Since strings are basically just uint16le arrays, they count as non-primitive.
(Just to double check, I compiled and ran this function
Summary
In order to create top level arrays, or objects, or to place an element in an array, one needs to pass in
null
for the key. However, with the typing definitions forassemblyscript-json
, and the defaulttsconfig
forassemblyscript
proper, null is not a valid argument to these functionsCurrent Solution
For right now, you can use
changetype<string>(0)
to get around this.Suggested Solution
It would be nice to have all of the
name
types to be alternated withnull
.The text was updated successfully, but these errors were encountered: