From 4d31b7016c99595e3bb993383078922d0f82be91 Mon Sep 17 00:00:00 2001 From: PalmDevs Date: Thu, 15 May 2025 16:47:02 +0700 Subject: [PATCH] chore(lib/modules/metro/subscriptions): update documentation --- lib/modules/src/metro/subscriptions/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/modules/src/metro/subscriptions/index.ts b/lib/modules/src/metro/subscriptions/index.ts index d7dda12..7d8bf6f 100644 --- a/lib/modules/src/metro/subscriptions/index.ts +++ b/lib/modules/src/metro/subscriptions/index.ts @@ -9,6 +9,7 @@ export type ModuleWithImportedPathInitializedCallback = (id: Metro.ModuleID, pat /** * Registers a callback to be called when any module is initialized. + * During this time, the module factory is not yet executed. * * @see {@link initializedModuleHasBadExports} to avoid bad module exports. * @@ -23,6 +24,9 @@ export function onAnyModuleInitialized(callback: ModuleInitializedCallback) { /** * Registers a callback to be called when a specific module is initialized. * + * This runs after the module factory has been executed, but before the module is considered initialized by Metro. + * However, Revenge APIs will consider the module initialized at this poi + * * @see {@link initializedModuleHasBadExports} to avoid bad module exports. * * @param id The ID of the module. @@ -56,6 +60,9 @@ export function onModuleFinishedImporting(callback: ModuleWithImportedPathInitia /** * Registers a callback to be called when any module is required the first time. * + * This runs after the module factory has been executed, but before the module is considered initialized by Metro. + * However, Revenge APIs will consider the module initialized at this point. + * * @see {@link initializedModuleHasBadExports} to avoid bad module exports. * * @param callback The callback to be called. @@ -68,6 +75,7 @@ export function onAnyModuleFirstRequired(callback: ModuleFirstRequiredCallback) /** * Registers a callback to be called when a specific module is required the first time. + * During this time, the module factory is not yet executed. * * @see {@link initializedModuleHasBadExports} to avoid bad module exports. *