From 2d77984e6a295bbf9b1861b5532805d8ba793656 Mon Sep 17 00:00:00 2001
From: Jamie Magee <jamie.magee@gmail.com>
Date: Tue, 27 Jun 2023 10:45:09 -0700
Subject: [PATCH] refactor: override return type of `JSON.parse` (#23011)

---
 lib/util/clone.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/util/clone.ts b/lib/util/clone.ts
index fca0b85c3c..115ea2e67d 100644
--- a/lib/util/clone.ts
+++ b/lib/util/clone.ts
@@ -13,7 +13,7 @@ export function clone<T = unknown>(input: T): T {
     logger.warn({ err }, 'error cloning object');
     const str = quickStringify(input);
     if (str) {
-      return JSON.parse(str);
+      return JSON.parse(str) as T;
     }
 
     // istanbul ignore next: not easily testable
-- 
GitLab