UNPKG

1.39 kBTypeScriptView Raw
1import { StackFrame, StackLineParser, StackParser } from '@sentry/types';
2/**
3 * Creates a stack parser with the supplied line parsers
4 *
5 * StackFrames are returned in the correct order for Sentry Exception
6 * frames and with Sentry SDK internal frames removed from the top and bottom
7 *
8 */
9export declare function createStackParser(...parsers: StackLineParser[]): StackParser;
10/**
11 * Gets a stack parser implementation from Options.stackParser
12 * @see Options
13 *
14 * If options contains an array of line parsers, it is converted into a parser
15 */
16export declare function stackParserFromStackParserOptions(stackParser: StackParser | StackLineParser[]): StackParser;
17/**
18 * @hidden
19 */
20export declare function stripSentryFramesAndReverse(stack: StackFrame[]): StackFrame[];
21/**
22 * Safely extract function name from itself
23 */
24export declare function getFunctionName(fn: unknown): string;
25declare type GetModuleFn = (filename: string | undefined) => string | undefined;
26/**
27 * Node.js stack line parser
28 *
29 * This is in @sentry/utils so it can be used from the Electron SDK in the browser for when `nodeIntegration == true`.
30 * This allows it to be used without referencing or importing any node specific code which causes bundlers to complain
31 */
32export declare function nodeStackLineParser(getModule?: GetModuleFn): StackLineParser;
33export {};
34//# sourceMappingURL=stacktrace.d.ts.map
\No newline at end of file