From 3622f547bf4b1a3aeae85febd2fe8f8bc188f93d Mon Sep 17 00:00:00 2001 From: Alessio Prestileo Date: Fri, 6 May 2022 14:25:44 +0200 Subject: [PATCH] Update types to reflect issue#45 The parse function should not be imported by itself. Types were updated accordingly. --- error-stack-parser.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/error-stack-parser.d.ts b/error-stack-parser.d.ts index c0ab289..8f443d3 100644 --- a/error-stack-parser.d.ts +++ b/error-stack-parser.d.ts @@ -3,16 +3,16 @@ // Definitions by: Eric Wendelin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -import StackFrame = require("stackframe"); +import StackFrame from "stackframe"; -declare module ErrorStackParser { +declare namespace ErrorStackParser { /** * Given an Error object, extract the most information from it. * * @param {Error} error object * @return {Array} of StackFrames */ - export function parse(error: Error): StackFrame[]; + function parse(error: Error): StackFrame[]; } -export = ErrorStackParser; +export default ErrorStackParser;