UNPKG

type-comparator

Version:

Useful comparator functions written on Typescript

19 lines 647 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const interfaces_1 = require("../interfaces"); const then_chain_1 = require("./then-chain"); class ElseChain { constructor(originalChain) { this.originalChain = originalChain; } else(comparator) { return this.originalChain.use(comparator); } elif(condition) { const mutations = this.originalChain['mutations']; mutations.push({ type: interfaces_1.MutationType.IF, condition }); return new then_chain_1.ThenChain(this.originalChain); } } exports.ElseChain = ElseChain; //# sourceMappingURL=else-chain.js.map