withOperator()

in src/alert/condition.ts [61:70]


    withOperator(operator: GrafanaOperatorType) {
        const types = ['and', 'or'] as const;

        if (!types.includes(operator)) {
            throw Error(`Operator must be one of [${types.toString()}]`);
        }

        this._operator.type = operator;
        return this;
    }