@oxog/delay
Version:
A comprehensive, zero-dependency delay/timeout utility library with advanced timing features
25 lines • 1.04 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DelayErrorCode = exports.DelayError = void 0;
class DelayError extends Error {
constructor(message, code, details) {
super(message);
this.code = code;
this.details = details;
this.name = 'DelayError';
Object.setPrototypeOf(this, DelayError.prototype);
}
}
exports.DelayError = DelayError;
var DelayErrorCode;
(function (DelayErrorCode) {
DelayErrorCode["CANCELLED"] = "DELAY_CANCELLED";
DelayErrorCode["INVALID_TIME"] = "INVALID_TIME";
DelayErrorCode["INVALID_TIME_STRING"] = "INVALID_TIME_STRING";
DelayErrorCode["NEGATIVE_DELAY"] = "NEGATIVE_DELAY";
DelayErrorCode["TIMEOUT"] = "TIMEOUT";
DelayErrorCode["RETRY_EXHAUSTED"] = "RETRY_EXHAUSTED";
DelayErrorCode["INVALID_OPTIONS"] = "INVALID_OPTIONS";
DelayErrorCode["UNSUPPORTED_ENVIRONMENT"] = "UNSUPPORTED_ENVIRONMENT";
})(DelayErrorCode || (exports.DelayErrorCode = DelayErrorCode = {}));
//# sourceMappingURL=index.js.map