Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
[Metro > Common] Add the util polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
maisymoe committed Nov 13, 2023
1 parent 0a78aa4 commit c585300
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/def.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ interface VendettaObject {
moment: typeof _moment;
chroma: typeof _chroma;
lodash: typeof _lodash;
util: PropIntellisense<"inspect" | "isNullOrUndefined">;
};
};
constants: {
Expand Down
4 changes: 4 additions & 0 deletions src/lib/metro/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");

0 comments on commit c585300

Please sign in to comment.