From ae10deaee409989caa3a3582deec3efa19fb6a7c Mon Sep 17 00:00:00 2001 From: Vendicated Date: Sat, 8 Jun 2024 03:41:45 +0200 Subject: [PATCH] fix --- src/webpack/common/stores.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/webpack/common/stores.ts b/src/webpack/common/stores.ts index 5273df30b..123c62b05 100644 --- a/src/webpack/common/stores.ts +++ b/src/webpack/common/stores.ts @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -import { proxyLazy } from "@utils/lazy"; import type * as Stores from "discord-types/stores"; // eslint-disable-next-line path-alias/no-relative -import { findByProps, findByPropsLazy } from "../webpack"; +import { findByPropsLazy } from "../webpack"; import { waitForStore } from "./internal"; import * as t from "./types/stores"; @@ -67,13 +66,8 @@ export let DraftStore: t.DraftStore; * * @example const user = useStateFromStores([UserStore], () => UserStore.getCurrentUser(), null, (old, current) => old.id === current.id); */ - -export const useStateFromStores = proxyLazy(() => findByProps("useStateFromStores").useStateFromStores) as ( - stores: t.FluxStore[], - mapper: () => T, - dependencies?: any, - isEqual?: (old: T, newer: T) => boolean -) => T; +// eslint-disable-next-line prefer-destructuring +export const useStateFromStores: t.useStateFromStores = findByPropsLazy("useStateFromStores").useStateFromStores; waitForStore("DraftStore", s => DraftStore = s); waitForStore("UserStore", s => UserStore = s);