raygun
Version:
Raygun package for Node.js, written in TypeScript
29 lines (28 loc) • 1.14 kB
TypeScript
import type { BreadcrumbMessage, Breadcrumb } from "./types";
/**
* Adds Breadcrumb to current scope
* @param breadcrumb - either String message or BreadcrumbMessage object
* @param type - defaults to manual, values as defined in Breadcrumb type
*/
export declare function addBreadcrumb(breadcrumb: string | BreadcrumbMessage, type?: Breadcrumb["type"]): void;
/**
* Obtain list of Breadcrumbs in current scope
* @returns List of Breadcrumbs or null if no local storage
*/
export declare function getBreadcrumbs(): Breadcrumb[] | null;
/**
* Run synchronous function in Breadcrumb scope
* @param f - function to run
* @param store - optional Breadcrumb scope store
*/
export declare function runWithBreadcrumbs(f: () => void, store?: Breadcrumb[]): void;
/**
* Run asynchronous function returning a Promise in Breadcrumb scope
* @param f - asynchronous function to run
* @param store - optional Breadcrumb scope store
*/
export declare function runWithBreadcrumbsAsync<T>(f: () => Promise<T>, store?: Breadcrumb[]): Promise<T>;
/**
* Clear the stored Breadcrumbs in current scope
*/
export declare function clear(): void;