forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
error-stack-parser.d.ts
26 lines (23 loc) · 869 Bytes
/
error-stack-parser.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Type definitions for ErrorStackParser v1.3.3
// Project: https://github.com/stacktracejs/error-stack-parser
// Definitions by: Eric Wendelin <https://www.eriwen.com>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module ErrorStackParser {
export interface StackFrame {
constructor(functionName: string, args: any, fileName: string, lineNumber: number, columnNumber: number, source: string): StackFrame;
functionName?: string;
args?: any[];
fileName?: string;
lineNumber?: number;
columnNumber?: number;
source?: string;
toString(): string;
}
/**
* Given an Error object, extract the most information from it.
*
* @param {Error} error object
* @return {Array} of StackFrames
*/
export function parse(error: Error): StackFrame[];
}