LoopParams<T>
Options for loop.
Import:
import type { LoopParams } from 'obsidian-dev-utils/obsidian/loop';Signature:
export interface LoopParams<T>Properties
| Property | Type | Description |
|---|---|---|
| abortSignal? | AbortSignal | An optional abort signal to cancel the loop. |
| items | T[] | Items to loop over. |
| noticeBeforeShownTimeoutInMilliseconds? | number | A timeout for the notice before it is shown. |
| noticeMinTimeoutInMilliseconds? | number | A minimum timeout for the notice. |
| pluginNoticeComponent | PluginNoticeComponent | A component to show notices. |
| progressBarTitle? | string | A title of the progress bar. |
| shouldContinueOnError? | boolean | Whether to continue the loop on error. |
| shouldShowNotice? | boolean | Whether to show a notice. |
| shouldShowProgressBar? | boolean | Whether to show a progress bar. |
| uiUpdateThresholdInMilliseconds? | number | A threshold for the UI update. |
Methods
| Method | Returns | Description |
|---|---|---|
| buildNoticeMessage(params) | string | Build a notice message for each item. |
| processItem(item) | Promisable<void> | Process each item. |
Links to this page: