Skip to content

RunWithTimeoutNoticeParams<Result>

Options for runWithTimeout.

Import:

import type { RunWithTimeoutNoticeParams } from '@mnaoumov/obsidian-lib/async-with-notice';

Signature:

export interface RunWithTimeoutNoticeParams<Result>

Properties

PropertyTypeDescription
content?ValueProvider<DocumentFragment | string>Custom content to show in the notice instead of the default timed-out message. Resolved only if the operation exceeds RunWithTimeoutNoticeParams.timeoutInMilliseconds, shown as a permanent notice, and hidden when the operation completes.
context?unknownThe context of the function.
operationFunction(abortSignal: AbortSignal) => Promisable<Result>The operation function to execute.
operationName?stringThe name of the operation.
pluginNoticeComponentnull | PluginNoticeComponentPlugin notice component used to show the timeout notice. When null (or shouldShowTimeoutNotice is false), no notice is shown and the timeout is only logged.
shouldShowTimeoutNotice?booleanWhether to show a timeout notice.
stackTrace?stringThe stack trace of the source function.
timeoutInMillisecondsnumberThe maximum time to wait in milliseconds.

Links to this page: