From 37ed46226cbcc29b759d78920b50d1abea6e2977 Mon Sep 17 00:00:00 2001 From: PalmDevs Date: Mon, 4 Aug 2025 09:41:18 +0700 Subject: [PATCH] chore(lib/assets): document use of `unproxify` to trigger set module ID --- lib/assets/src/preinit.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/assets/src/preinit.ts b/lib/assets/src/preinit.ts index d6fbfc5..769bdfe 100644 --- a/lib/assets/src/preinit.ts +++ b/lib/assets/src/preinit.ts @@ -16,6 +16,7 @@ import { getModuleDependencies } from '@revenge-mod/modules/metro/utils' import { proxify } from '@revenge-mod/utils/proxy' import { aOverrides } from './_internal' import { cacheAsset, cached } from './caches' +import type { Metro } from '@revenge-mod/modules/types' import type { ReactNative } from '@revenge-mod/react/types' import type { Asset, PackagerAsset } from './types' @@ -88,18 +89,17 @@ const unsubAR = waitForModules( ) /** - * If you need to use this ID before assets-registry is initialized, interact with AssetsRegistry proxy first. + * If you need to use this ID, unproxify {@link AssetsRegistry} first. * * ```js * preinit() { - * AssetsRegistry.getAssetByID(0) + * unproxify(AssetsRegistry) * // Module ID will now be set! * AssetsRegistryModuleId // ... * } * ``` */ -export let AssetsRegistryModuleId: number | undefined - +export let AssetsRegistryModuleId: Metro.ModuleID | undefined export let AssetsRegistry: ReactNative.AssetsRegistry = proxify(() => { for (const [, id] of lookupModules(byDependencies([[]]), { initialize: false,