VaultTransactionConstructorParams
Parameters for the VaultTransaction constructor.
Import:
import type { VaultTransactionConstructorParams } from 'obsidian-dev-utils/obsidian/vault-transaction';Signature:
export interface VaultTransactionConstructorParamsProperties
| Property | Type | Description |
|---|---|---|
| app | App | The Obsidian application instance. |
| stagingFolderPath? | string | The dot-prefixed folder that soft-deleted resources are moved into until the transaction is committed or rolled back. It must stay .-prefixed so Obsidian leaves the staged resources untracked. |
Methods
| Method | Returns | Description |
|---|---|---|
| openMutationBypass(this) | Disposable | Opens an ambient mutation-bypass scope covering the paths this transaction touches, so the transaction's own writes pass a shouldBlockMutations lock that the owning operation holds. It is called once when the transaction is constructed, and the returned Disposable is disposed when the transaction settles (on commit, rollback, or await using disposal) — so the bypass stays active through rollback, including auto-rollback, which a caller managing the scope itself could easily get wrong. Typically () => resourceLockComponent.bypassBlockedMutations(lockedPathsOrFiles). Omit it for the common standalone case where the transaction operates on unlocked paths. |