mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-03 10:40:44 +08:00
10 lines
253 B
TypeScript
10 lines
253 B
TypeScript
// because AbortSignal.throwIfAborted is not available in abortcontroller-polyfill
|
|
export function throwIfAborted(abort?: AbortSignal) {
|
|
if (abort?.aborted) {
|
|
throw abort.reason;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
export const MANUALLY_STOP = 'manually-stop';
|