Skip to content

Commit

Permalink
Add TypeScript definitions.
Browse files Browse the repository at this point in the history
  • Loading branch information
eriwen committed Apr 2, 2016
1 parent 97aa0aa commit ee4e531
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions error-stack-parser.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,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[];
}

0 comments on commit ee4e531

Please sign in to comment.