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,
visual_input) are left out.
Parameters
None.
Returns
Record<string, unknown> — The gate: id (when set), question, criteria
(when trueMeans or falseMeans is set), threshold, on_fail, and visual_input
(when visualInput is set).