Skip to content

LoopParams<T>

Options for loop.

Import:

import type { LoopParams } from 'obsidian-dev-utils/obsidian/loop';

Signature:

export interface LoopParams<T>

Properties

PropertyTypeDescription
abortSignal?AbortSignalAn optional abort signal to cancel the loop.
itemsT[]Items to loop over.
noticeBeforeShownTimeoutInMilliseconds?numberA timeout for the notice before it is shown.
noticeMinTimeoutInMilliseconds?numberA minimum timeout for the notice.
pluginNoticeComponentnull | PluginNoticeComponentA component to show notices.
progressBarTitle?stringA title of the progress bar.
shouldContinueOnError?booleanWhether to continue the loop on error.
shouldShowNotice?booleanWhether to show a notice.
shouldShowProgressBar?booleanWhether to show a progress bar.
uiUpdateThresholdInMilliseconds?numberA threshold for the UI update.

Methods

MethodReturnsDescription
buildNoticeMessage(params)stringBuild a notice message for each item.
processItem(item)Promisable<void>Process each item.

Links to this page: