toDict
Return the gate as the object sent in the function’s gates list, in the shape of
the SWML gate object. Keys that weren’t set (id, criteria) are
left out.
Parameters
None.
Returns
Record<string, unknown> — The gate: id (when set), question, criteria
(when trueMeans or falseMeans is set), threshold, and on_fail.