holdBulkOperationWhile<T>
Keeps a bulk operation’s lease lock fresh while it waits on something that is not progress but not a hang either, such as a dialog waiting for the user.
Reports progress at once, then every BULK_OPERATION_HOLD_INTERVAL_IN_MILLISECONDS while the promise is pending, and once more when it settles. Outside a bulk operation it costs one interval and nothing else.
Import:
import { holdBulkOperationWhile } from '@mnaoumov/obsidian-lib/bulk-operation-progress';Signature:
function holdBulkOperationWhile(promise: Promise<T>): Promise<T>Parameters:
| Parameter | Type | Description |
|---|---|---|
promise |
Promise<T> | The promise to wait for. |
Returns: Promise<T> — The promise’s value.
Links to this page: