8000 Add TypeScript definitions. · stacktracejs/error-stack-parser@0c15a71 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0c15a71

Browse files
committed
Add TypeScript definitions.
1 parent 1162e66 commit 0c15a71

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

error-stack-parser.d.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Type definitions for ErrorStackParser v1.3.3
2+
// Project: https://github.com/stacktracejs/error-stack-parser
3+
// Definitions by: Eric Wendelin <https://www.eriwen.com>
4+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5+
6+
declare module ErrorStackParser {
7+
export interface StackFrame {
8+
constructor(functionName: string, args: any, fileName: string, lineNumber: number, columnNumber: number, source: string): StackFrame;
9+
10+
functionName?: string;
11+
args?: any[];
12+
fileName?: string;
13+
lineNumber?: number;
14+
columnNumber?: number;
15+
source?: string;
16+
toString(): string;
17+
}
18+
19+
/**
20+
* Given an Error object, extract the most information from it.
21+
*
22+
* @param {Error} error object
23+
* @return {Array} of StackFrames
24+
*/
25+
export function parse(error: Error): StackFrame[];
26+
}

0 commit comments

Comments
 (0)
0