chore(lib): clarify doc

This commit is contained in:
PalmDevs 2026-08-01 14:49:54 +07:00
parent acdf865cc7
commit bd5ee5c1f1
No known key found for this signature in database
GPG key ID: 6FAE8F8677ACA8BA
4 changed files with 7 additions and 4 deletions

View file

@ -81,10 +81,10 @@ const unsubAR = waitForModules(
)
/**
* If you need to use this ID, unproxify {@link AssetsRegistry} first.
* If you need to use this ID during `preInit`, unproxify {@link AssetsRegistry} first.
*
* ```js
* preinit() {
* preInit() {
* unproxify(AssetsRegistry)
* // Module ID will now be set!
* AssetsRegistryModuleId // ...

View file

@ -237,7 +237,8 @@ export interface PluginLifecycles<
*/
init?: (this: Plugin<O, 'Init'>, api: InitPluginApi<O>) => any
/**
* Runs when the plugin can be started with all APIs available.
* Runs during the `AppRegistry.runApplication` call,
* when the plugin can be started with all APIs available.
*
* @param api Plugin API.
*/

View file

@ -15,6 +15,7 @@ let RtCount = 0
const unsubRt = waitForModules(
withProps<typeof React>('useState'),
(exports, id) => {
// React has 2 modules re-exporting it, the second of which, is the one that modules requires from
if (RtCount++ === 2) return unsubRt()
ReactModuleId = id
@ -43,6 +44,7 @@ let RJsxRCount = 0
const unsubRJSXR = waitForModules(
withProps<typeof ReactJSXRuntime>('jsxs'),
(exports, id) => {
// React/JSXRuntime has 2 modules re-exporting it, the second of which, is the one that modules requires from
if (RJsxRCount++ === 2) return unsubRJSXR()
ReactJSXRuntimeModuleId = id

View file

@ -19,7 +19,7 @@ const now = (cb: () => any) => {
}
/**
* A function that runs the callback as soon as possible.
* A non-blocking function that runs the callback as soon as possible.
* @param cb The callback to run.
*/
export const asap = (cb: AnyFunction) => {