/** * @file * * Mock of Obsidian's `iterateCacheRefs`. */ import type { CachedMetadata as CachedMetadataOriginal, ReferenceCache as ReferenceCacheOriginal } from 'obsidian'; import type { MaybeReturn } from '../../internal/types.mjs'; /** * Iterates the links and then the embeds of a note's cached metadata, stopping as soon as the callback returns * `true`. Obsidian deprecates it. * * @param cache - The note's cached metadata. * @param callback - Called for each reference; returning `true` stops the iteration. * @returns `true` when the callback returned `true`, `false` otherwise. * @throws If a reference has no `position`, so is not a `ReferenceCache`. */ export declare function iterateCacheRefs(cache: CachedMetadataOriginal, callback: (ref: ReferenceCacheOriginal) => MaybeReturn): boolean;