UNPKG

obsidian-dev-utils

Version:

This is the collection of useful functions that you can use for your Obsidian plugin development

34 lines (33 loc) 1.13 kB
/** * @packageDocumentation * * This module provides a type for frontmatter link cache with offsets. */ import type { FrontmatterLinkCache, Reference } from 'obsidian'; /** * Type for frontmatter link cache with offsets. */ export interface FrontmatterLinkCacheWithOffsets extends FrontmatterLinkCache { /** * An end offset of the link in the property value. */ endOffset: number; /** * A start offset of the link in the property value. */ startOffset: number; } /** * Checks if the reference is a frontmatter link cache with offsets. * * @param reference - The reference to check. * @returns Whether the reference is a frontmatter link cache with offsets. */ export declare function isFrontmatterLinkCacheWithOffsets(reference: Reference): reference is FrontmatterLinkCacheWithOffsets; /** * Converts a frontmatter link cache to a frontmatter link cache with offsets. * * @param reference - The reference to convert. * @returns The converted reference. */ export declare function toFrontmatterLinkCacheWithOffsets(reference: FrontmatterLinkCache): FrontmatterLinkCacheWithOffsets;