@micro-zoe/micro-app 1.0.0-alpha.7 → 1.0.0-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -11,15 +11,16 @@ declare module '@micro-zoe/micro-app' {
11
11
  }
12
12
 
13
13
  declare module '@micro-zoe/micro-app/micro_app' {
14
- import type { OptionsType, MicroAppBaseType, Router, AppName, Func, lifeCyclesType, MicroAppConfig } from '@micro-app/types';
14
+ import type { OptionsType, MicroAppBaseType, Router, AppName, Func, lifeCyclesType, MicroAppConfig, GetActiveAppsParam } from '@micro-app/types';
15
15
  import preFetch from '@micro-zoe/micro-app/prefetch';
16
16
  import { EventCenterForBaseApp } from '@micro-zoe/micro-app/interact';
17
17
  /**
18
18
  * if app not prefetch & not unmount, then app is active
19
19
  * @param excludeHiddenApp exclude hidden keep-alive app, default is false
20
+ * @param excludePreRender exclude pre render app
20
21
  * @returns active apps
21
22
  */
22
- export function getActiveApps(excludeHiddenApp?: boolean): AppName[];
23
+ export function getActiveApps({ excludeHiddenApp, excludePreRender, }?: GetActiveAppsParam): AppName[];
23
24
  export function getAllApps(): string[];
24
25
  type unmountAppOptions = {
25
26
  destroy?: boolean;
@@ -94,7 +95,7 @@ declare module '@micro-zoe/micro-app/prefetch' {
94
95
  * 2: disableScopecss, disableSandbox, disableMemoryRouter must be same with micro-app element, if conflict, the one who executes first shall prevail
95
96
  * @param apps micro apps
96
97
  */
97
- export default function preFetch(apps: prefetchParamList): void;
98
+ export default function preFetch(apps: prefetchParamList, delay?: number): void;
98
99
  /**
99
100
  * load global assets into cache
100
101
  * @param assets global assets of js, css
@@ -123,6 +124,7 @@ declare module '@micro-zoe/micro-app/libs/utils' {
123
124
  export function isNull(target: unknown): target is null;
124
125
  export function isString(target: unknown): target is string;
125
126
  export function isBoolean(target: unknown): target is boolean;
127
+ export function isNumber(target: unknown): target is Number;
126
128
  export function isFunction(target: unknown): target is Function;
127
129
  export function isPlainObject<T = Record<PropertyKey, unknown>>(target: unknown): target is T;
128
130
  export function isObject(target: unknown): target is Object;