error-stack-parser.d.ts 597 B

12345678910111213141516171819
  1. // Type definitions for ErrorStackParser v2.1.0
  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. import StackFrame = require("stackframe");
  6. declare namespace ErrorStackParser {
  7. export type {StackFrame};
  8. /**
  9. * Given an Error object, extract the most information from it.
  10. *
  11. * @param {Error} error object
  12. * @return {Array} of StackFrames
  13. */
  14. export function parse(error: Error): StackFrame[];
  15. }
  16. export = ErrorStackParser;