[Metro > Common] Add lodash to common modules

This commit is contained in:
Beef 2023-03-22 21:24:55 +00:00
parent 0bf2b58926
commit 72c9055b5a
3 changed files with 7 additions and 1 deletions

View file

@ -17,6 +17,7 @@
"@react-native-clipboard/clipboard": "1.10.0",
"@swc/core": "^1.3.35",
"@types/chroma-js": "^2.4.0",
"@types/lodash": "^4.14.191",
"@types/react": "18.0.27",
"@types/react-native": "0.70.6",
"esbuild": "^0.17.11",

2
src/def.d.ts vendored
View file

@ -4,6 +4,7 @@ import _RN from "react-native";
import _Clipboard from "@react-native-clipboard/clipboard";
import _moment from "moment";
import _chroma from "chroma-js";
import _lodash from "lodash";
type MetroModules = { [id: number]: any };
@ -363,6 +364,7 @@ interface VendettaObject {
ReactNative: typeof _RN;
moment: typeof _moment;
chroma: typeof _chroma;
lodash: typeof _lodash;
};
};
constants: {

View file

@ -28,3 +28,6 @@ export const moment = findByProps("isMoment") as typeof import("moment");
// chroma.js
export { chroma } from "@lib/preinit";
// Lodash
export const lodash = findByProps("forEachRight") as typeof import("lodash");