UNPKG

@oxog/delay

Version:

A comprehensive, zero-dependency delay/timeout utility library with advanced timing features

21 lines 865 B
export class DelayError extends Error { constructor(message, code, details) { super(message); this.code = code; this.details = details; this.name = 'DelayError'; Object.setPrototypeOf(this, DelayError.prototype); } } export 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 || (DelayErrorCode = {})); //# sourceMappingURL=index.js.map