LoopParams<T>
Options for loop.
Import:
import type { LoopParams } from '@mnaoumov/obsidian-lib/loop';Signature:
export interface LoopParams<T>Properties
| Property | Type | Description |
|---|---|---|
| abortSignal? | AbortSignal | An optional abort signal to cancel the loop. |
| buildNoticeMessage | (params: LoopBuildNoticeMessageParams<T>) => string | Build a notice message for each item. |
| 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 | null | PluginNoticeComponent | A component to show notices. |
| processItem | (item: T) => Promisable<void> | Process each item. |
| progressBarTitle? | DocumentFragment | string | A title of the progress bar. Pass a DocumentFragment to mark up part of the title, such as a plugin name rendered as code. Each render appends a fresh clone of it, so the caller's fragment stays intact. |
| 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. |
Links to this page: