Skip to content

Commit

Permalink
fix: incorrect error type (#68)
Browse files Browse the repository at this point in the history
Seems like I imported the incorrect error type here and did not notice
  • Loading branch information
ComradeVanti committed Dec 20, 2023
1 parent 57f1c4b commit a0f1abe
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/utils/error-type-guards.ts
Original file line number Diff line number Diff line change
@@ -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!",
Expand Down

0 comments on commit a0f1abe

Please sign in to comment.