UNPKG

obsidian-dev-utils

Version:

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

62 lines (61 loc) 1.91 kB
/** * @packageDocumentation * * Provides utility functions for working with backlinks. */ import type { DataviewInlineApi } from './Dataview.mjs'; import type { PathOrAbstractFile, PathOrFile } from './FileSystem.mjs'; /** * Options for {@link renderDelayedBacklinksForFolder}. */ export interface RenderDelayedBacklinksForFolderOptions { /** * A {@link DataviewInlineApi} instance. */ dv: DataviewInlineApi; /** * A folder path. If not provided, the current file's folder will be used. */ folder?: string; /** * A title for the rendered backlinks. Defaults to "Folder Backlinks". */ title?: string; } /** * Options for {@link renderDelayedBacklinks}. */ export interface RenderDelayedBacklinksOptions { /** * A {@link DataviewInlineApi} instance. */ dv: DataviewInlineApi; /** * An array of PathOrFile. */ files: PathOrFile[]; /** * A title for the rendered backlinks. Defaults to "Backlinks". */ title?: string; } /** * Renders a backlinks table using the provided DataviewInlineApi and optional array of PathOrAbstractFile. * * @param dv - The DataviewInlineApi instance. * @param pathOrFiles - An optional array of PathOrAbstractFile. * @returns A {@link Promise} that resolves when the backlinks table has been rendered. */ export declare function renderBacklinksTable(dv: DataviewInlineApi, pathOrFiles?: PathOrAbstractFile[]): Promise<void>; /** * Renders delayed backlinks. * * @param options - The options for rendering delayed backlinks. */ export declare function renderDelayedBacklinks(options: RenderDelayedBacklinksOptions): void; /** * Renders delayed backlinks for a specific folder. * * @param options - The options for rendering delayed backlinks. */ export declare function renderDelayedBacklinksForFolder(options: RenderDelayedBacklinksForFolderOptions): void;