// src/abort-error.ts
function abortError(message) {
  const err = new Error(message);
  Object.defineProperty(err, "name", { value: "AbortError" });
  return err;
}
function isAbortError(err) {
  return err instanceof Error && err.name === "AbortError";
}
function throwIfAborted(signal, message = "operation aborted") {
  if (signal?.aborted) {
    throw abortError(message);
  }
}

export {
  abortError,
  isAbortError,
  throwIfAborted
};
//# sourceMappingURL=chunk-PVGDJXVK.js.map