ditto/src/utils/abort.ts
2024-01-23 14:06:51 -06:00

6 lines
184 B
TypeScript

/** Creates an `AbortError` object matching the Fetch API. */
function abortError() {
return new DOMException('The signal has been aborted', 'AbortError');
}
export { abortError };