UNPKG

1.29 kBTypeScriptView Raw
1/**
2 * This was originally forked from https://github.com/occ/TraceKit, but has since been
3 * largely modified and is now maintained as part of Sentry JS SDK.
4 */
5/**
6 * An object representing a single stack frame.
7 * {Object} StackFrame
8 * {string} url The JavaScript or HTML file URL.
9 * {string} func The function name, or empty for anonymous functions (if guessing did not work).
10 * {string[]?} args The arguments passed to the function, if known.
11 * {number=} line The line number, if known.
12 * {number=} column The column number, if known.
13 * {string[]} context An array of source code lines; the middle element corresponds to the correct line#.
14 */
15export interface StackFrame {
16 url: string;
17 func: string;
18 args: string[];
19 line: number | null;
20 column: number | null;
21}
22/**
23 * An object representing a JavaScript stack trace.
24 * {Object} StackTrace
25 * {string} name The name of the thrown exception.
26 * {string} message The exception error message.
27 * {TraceKit.StackFrame[]} stack An array of stack frames.
28 */
29export interface StackTrace {
30 name: string;
31 message: string;
32 mechanism?: string;
33 stack: StackFrame[];
34 failed?: boolean;
35}
36/** JSDoc */
37export declare function computeStackTrace(ex: any): StackTrace;
38//# sourceMappingURL=tracekit.d.ts.map
\No newline at end of file