From a3f47810ee6304df3a934d603fd8935a8e26cb47 Mon Sep 17 00:00:00 2001 From: Lucy C <12953208+elvece@users.noreply.github.com> Date: Tue, 15 Nov 2022 12:36:59 -0500 Subject: [PATCH] Update util.ts Co-authored-by: J M <2364004+Blu-J@users.noreply.github.com> --- util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.ts b/util.ts index fe979bd..5ffc571 100644 --- a/util.ts +++ b/util.ts @@ -23,4 +23,4 @@ export const error = (error: string) => ({ error }); export const ok = { result: null }; // deno-lint-ignore no-explicit-any -export const isKnownError = (e: any): e is T.KnownError => e.error || e["error-code"] \ No newline at end of file +export const isKnownError = (e: unknown): e is T.KnownError => e instanceof Object && ('error' in e || "error-code" in e) \ No newline at end of file