From 083f8b74b64ef2e8a5e1abcc070a91f549de706d Mon Sep 17 00:00:00 2001 From: Ramon Brullo Date: Wed, 20 Dec 2023 16:29:31 +0100 Subject: [PATCH] fix: incorrect error type Seems like I imported the incorrect error type here and did not notice --- src/utils/error-type-guards.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils/error-type-guards.ts b/src/utils/error-type-guards.ts index 95745343..8a676699 100644 --- a/src/utils/error-type-guards.ts +++ b/src/utils/error-type-guards.ts @@ -1,8 +1,7 @@ import { HttpErrorBase } from "npm-registry-fetch"; import { AssertionError } from "assert"; -import ErrnoException = NodeJS.ErrnoException; -export function assertIsError(x: unknown): asserts x is ErrnoException { +export function assertIsError(x: unknown): asserts x is Error { if (!(x instanceof Error)) throw new AssertionError({ message: "Argument was not an error!",