wasmoon
wasmoon copied to clipboard
Can't use null in a table
If a JS API explicitly needs the null value within an object it's not currently possible.
Eg
jsFunc({
a = 10,
b = nil
})
Will generate a JS object like this:
{ a: 10 }
That's because nil works far more like JS's undefined than null.
I think the best solution is adding a null type extension and setting the global "null" to this type extension allowing it to be used like a primitive.
Indeed, and it should be under injectObjects flag