effect
Version:
The missing standard library for TypeScript, for writing production-grade software.
45 lines (44 loc) • 1.92 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isDone = exports.isContinue = exports.done = exports.continueWith = exports._continue = exports.OP_DONE = exports.OP_CONTINUE = void 0;
var Chunk = _interopRequireWildcard(require("../../Chunk.js"));
var Intervals = _interopRequireWildcard(require("../../ScheduleIntervals.js"));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
/** @internal */
const OP_CONTINUE = exports.OP_CONTINUE = "Continue";
/** @internal */
const OP_DONE = exports.OP_DONE = "Done";
/** @internal */
const _continue = intervals => {
return {
_tag: OP_CONTINUE,
intervals
};
};
/** @internal */
exports._continue = _continue;
const continueWith = interval => {
return {
_tag: OP_CONTINUE,
intervals: Intervals.make(Chunk.of(interval))
};
};
/** @internal */
exports.continueWith = continueWith;
const done = exports.done = {
_tag: OP_DONE
};
/** @internal */
const isContinue = self => {
return self._tag === OP_CONTINUE;
};
/** @internal */
exports.isContinue = isContinue;
const isDone = self => {
return self._tag === OP_DONE;
};
exports.isDone = isDone;
//# sourceMappingURL=decision.js.map