constructor(pos, heldGate, holdOffset, heldColumn, heldRow, resizingGateSlot) {
        let args = {pos, heldGate, holdOffset, heldColumn, heldRow, resizingGateSlot};
        if (pos !== undefined && !(pos instanceof Point)) {
            throw new DetailedError("Bad pos", args);
        }
        if (heldGate !== undefined && !(heldGate instanceof Gate)) {
            throw new DetailedError("Bad heldGate", args);
        }
        if (holdOffset !== undefined && !(holdOffset instanceof Point)) {
            throw new DetailedError("Bad holdOffset", args);
        }
        if (resizingGateSlot !== undefined && !(resizingGateSlot instanceof Point)) {
            throw new DetailedError("Bad resizingGateSlot", args);
        }
        if (heldColumn !== undefined && !(heldColumn instanceof GateColumn)) {
            throw new DetailedError("Bad heldColumn", args);
        }
        if (heldRow !== undefined && !Array.isArray(heldRow.gates)) {
            throw new DetailedError("Bad heldRow", args);
        }
        if (heldGate !== undefined && this.resizingGateSlot !== undefined) {
            throw new DetailedError("Holding AND resizing", args);
        }

        /** @type {undefined|!Point} */
        this.pos = pos;
        /** @type {undefined|!Gate} */
        this.heldGate = heldGate;
        /** @type {undefined|!Point} */
        this.holdOffset = holdOffset;
        /** @type {undefined|!GateColumn} */
        this.heldColumn = heldColumn;
        /** @type {undefined|!{initialState: *, gates: !Array.<undefined|!Gate>}} */
        this.heldRow = heldRow;
        /** @type {undefined|!Point} */
        this.resizingGateSlot = resizingGateSlot;
    }
@param {undefined|!Point} pos
@param {undefined|!Gate} heldGate
@param {undefined|!Point} holdOffset
@param {undefined|!GateColumn} heldColumn
@param {undefined|!{initialState: *, gates: !Array.<undefined|!Gate>}} heldRow
@param {undefined|!Point} resizingGateSlot