getAllBacklinksWithFiles

getAllBacklinksWithFiles(): ReadonlyMap<string, ReadonlySet<string>>

Returns a map of all backlink targets (destination file paths) to the sets of files that link to them. Uses the combined index (body + frontmatter).

Returns

ReadonlyMap<string, ReadonlySet<string>> — dest path → set of source paths.

Example

const allBacklinks = cache.getAllBacklinksWithFiles();
for (const [target, sources] of allBacklinks) {
  console.log(`${target} is linked from ${sources.size} files`);
}