If I have an actor method in Motoko that returns
async ?() to represent that either a) the method completed the operation successfully, i.e.
?(), or b) the method failed to complete, i.e.
null. Maybe I should use Motoko’s
Result interface to make that clearer?)
It seems like these are equivalent:
?() in Motoko
opt null in Candid
 | [null] in JS/TS
I don’t understand why
?() in Motoko becomes
opt null in Candid, but
() in Motoko becomes
() in Candid. I’m guessing that
[null] in JS/TS means success, whereas
 in JS/TS means failure?