chore(lib): clarify doc
This commit is contained in:
parent
acdf865cc7
commit
bd5ee5c1f1
4 changed files with 7 additions and 4 deletions
|
|
@ -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 // ...
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue