veffect
Version:
powerful TypeScript validation library built on the robust foundation of Effect combining exceptional type safety, high performance, and developer experience. Taking inspiration from Effect's functional principles, VEffect delivers a balanced approach tha
90 lines (89 loc) • 2.7 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.zip = exports.retry = exports.pollAndUpdate = exports.poll = exports.make = exports.launch = exports.collectAll = exports.MetricPollingTypeId = void 0;
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("./internal/metric/polling.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;
}
/**
* @since 2.0.0
* @category symbols
*/
const MetricPollingTypeId = exports.MetricPollingTypeId = internal.MetricPollingTypeId;
/**
* Constructs a new polling metric from a metric and poll effect.
*
* @since 2.0.0
* @category constructors
*/
const make = exports.make = internal.make;
/**
* Collects all of the polling metrics into a single polling metric, which
* polls for, updates, and produces the outputs of all individual metrics.
*
* @since 2.0.0
* @category constructors
*/
const collectAll = exports.collectAll = internal.collectAll;
/**
* Returns an effect that will launch the polling metric in a background
* fiber, using the specified schedule.
*
* @since 2.0.0
* @category utils
*/
const launch = exports.launch = internal.launch;
/**
* An effect that polls a value that may be fed to the metric.
*
* @since 2.0.0
* @category utils
*/
const poll = exports.poll = internal.poll;
/**
* An effect that polls for a value and uses the value to update the metric.
*
* @since 2.0.0
* @category utils
*/
const pollAndUpdate = exports.pollAndUpdate = internal.pollAndUpdate;
/**
* Returns a new polling metric whose poll function will be retried with the
* specified retry policy.
*
* @since 2.0.0
* @category constructors
*/
const retry = exports.retry = internal.retry;
/**
* Zips this polling metric with the specified polling metric.
*
* @since 2.0.0
* @category utils
*/
const zip = exports.zip = internal.zip;
//# sourceMappingURL=MetricPolling.js.map