waitForAbort<T = unknown>
Waits for an abort signal to abort and resolves with its reason.
Import:
import { waitForAbort } from 'obsidian-dev-utils/abort-controller';Signature:
function waitForAbort(abortSignal: AbortSignal, shouldRejectOnAbort: boolean | undefined): Promise<T>Parameters:
| Parameter | Type | Description |
|---|---|---|
abortSignal | AbortSignal | The abort signal to wait for. |
shouldRejectOnAbort | boolean | undefined | Whether to reject the promise if the abort signal is aborted. |
Returns: Promise<T> — A Promise that resolves with the reason of the abort signal.