Skip to content

BuildBacklinksSnapshotParams<TPayload>

Params for buildBacklinksSnapshot.

Import:

import type { BuildBacklinksSnapshotParams } from 'obsidian-dev-utils/obsidian/link';

Signature:

export interface BuildBacklinksSnapshotParams<TPayload>

Properties

PropertyTypeDescription
backlinksBacklinksLikeThe backlinks to record.
target?MutableBacklinksSnapshot<TPayload>An existing snapshot to merge into, so several sets of backlinks can be accumulated into one.

Merging is what makes a single rewrite pass per note possible when a note links to several moved targets: without it, calling the rewrite once per target would open — and write — the same note repeatedly.

When omitted, a new snapshot is created.

Methods

MethodReturnsDescription
linkIdentityKeyProvider(this, link)stringComputes the identity key of a link.

Must be the same function passed to editBacklinksSnapshot, or no link will ever match.
pathRemapper(this, backlinkPath)stringRewrites the path of a backlink-holding note as it will be **after** the operation.

A note that holds a backlink can itself be renamed or moved by the same operation — including the renamed note's own self-links. Remapping here keys the snapshot by the path the rewrite will actually open.
payloadProvider(this, link)TPayloadProduces the payload to record for a link. See BacklinksSnapshot for what a payload is for.

Links to this page: