Skip to content

ProcessParams

Parameters for process.

Import:

import type { ProcessParams } from '@mnaoumov/obsidian-lib/vault';

Signature:

export interface ProcessParams extends ProcessOptions

Extends: ProcessOptions

Properties

PropertyTypeDescription
appAppThe application instance, typically used for accessing the vault.
newContentProviderValueProvider<null | string, ContentArguments>A value provider that returns the new content based on the old content of the file. It can be a string or a function that takes the old content as an argument and returns the new content.

A function has three outcomes:

- null — the new content cannot be produced YET; the process is retried. - the old content, returned unchanged — there is nothing to write; the process completes without touching the file. Use this for a refusal that is permanent, as returning null for one retries forever and holds the operation open. - any other string — the content to write.
pathOrFilePathOrFileThe path or file to be processed. It can be a string representing the path or a file object.
pluginNoticeComponentnull | PluginNoticeComponentPlugin notice component used to show the timeout notice. When null, no timeout notice is shown regardless of ProcessOptions.shouldShowTimeoutNotice; the timeout is only logged.
(Inherited from ProcessOptions)
resourceLockComponentnull | ResourceLockComponentAn resource-lock component used to lock the file's editor read-only for the duration of processing. The lock is reference-counted, so it composes with any outer operation-level lock on the same note.
(Inherited from ProcessOptions)
shouldFailOnMissingFile?booleanWhether to fail if the file is missing or deleted.
(Inherited from ProcessOptions)
shouldShowTimeoutNotice?booleanWhether to show a timeout notice.
(Inherited from ProcessOptions)

Links to this page: