UNPKG

obsidian-dev-utils

Version:

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

16 lines (15 loc) 605 B
/** * @packageDocumentation * * Contains utility functions for logging in Obsidian. */ import type { Promisable } from 'type-fest'; /** * Invokes a function and logs the start, end, and duration of the invocation. * * @param title - The title of the log. * @param fn - The function to invoke. * @param abortSignal - The abort signal to control the execution of the function. * @param stackTrace - Optional stack trace. */ export declare function invokeAsyncAndLog(title: string, fn: (abortSignal: AbortSignal) => Promisable<void>, abortSignal: AbortSignal, stackTrace?: string): Promise<void>;