From c58530080ebafa360e74bfc5effbbcf0599bdb27 Mon Sep 17 00:00:00 2001 From: maisy Date: Mon, 13 Nov 2023 23:53:24 +0000 Subject: [PATCH] [Metro > Common] Add the util polyfill --- src/def.d.ts | 1 + src/lib/metro/common.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/def.d.ts b/src/def.d.ts index 927551f..ccc57ab 100644 --- a/src/def.d.ts +++ b/src/def.d.ts @@ -401,6 +401,7 @@ interface VendettaObject { moment: typeof _moment; chroma: typeof _chroma; lodash: typeof _lodash; + util: PropIntellisense<"inspect" | "isNullOrUndefined">; }; }; constants: { diff --git a/src/lib/metro/common.ts b/src/lib/metro/common.ts index 482993b..3ad4a3c 100644 --- a/src/lib/metro/common.ts +++ b/src/lib/metro/common.ts @@ -62,3 +62,7 @@ export { chroma } from "@lib/preinit"; // Lodash export const lodash = findByProps("forEachRight") as typeof import("lodash"); + +// The node:util polyfill for RN +// TODO: Find types for this +export const util = findByProps("inspect", "isNullOrUndefined");