@module-federation/bridge-shared 2.8.2 → 2.9.0
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/dist/src/index.d.ts +1 -1
- package/dist/src/type.d.ts +22 -0
- package/package.json +1 -1
package/dist/src/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { RenderFnParams, ProviderParams } from './type';
|
|
1
|
+
export type { RenderFnParams, ProviderParams, BridgeFramework, BridgeOperation, BridgeOperationContext, BridgeOperationResult, BridgeOperationSide, BridgeRouteSummary, } from './type';
|
|
2
2
|
export { dispatchPopstateEnv } from './env';
|
package/dist/src/type.d.ts
CHANGED
|
@@ -12,3 +12,25 @@ export interface ProviderParams {
|
|
|
12
12
|
export interface RenderFnParams extends ProviderParams {
|
|
13
13
|
dom: HTMLElement;
|
|
14
14
|
}
|
|
15
|
+
export type BridgeOperationSide = 'consumer' | 'producer';
|
|
16
|
+
export type BridgeFramework = 'react' | 'vue';
|
|
17
|
+
export type BridgeOperation = 'render' | 'update' | 'destroy' | 'route-sync';
|
|
18
|
+
export interface BridgeRouteSummary {
|
|
19
|
+
action: 'memory-route-init' | 'host-to-remote';
|
|
20
|
+
from?: string;
|
|
21
|
+
to?: string;
|
|
22
|
+
basename?: string;
|
|
23
|
+
mechanism?: 'popstate';
|
|
24
|
+
}
|
|
25
|
+
export interface BridgeOperationContext {
|
|
26
|
+
side: BridgeOperationSide;
|
|
27
|
+
framework: BridgeFramework;
|
|
28
|
+
operation: BridgeOperation;
|
|
29
|
+
moduleName?: string;
|
|
30
|
+
route?: BridgeRouteSummary;
|
|
31
|
+
reason?: 'unmount' | 'direct';
|
|
32
|
+
}
|
|
33
|
+
export interface BridgeOperationResult {
|
|
34
|
+
context: BridgeOperationContext;
|
|
35
|
+
result?: unknown;
|
|
36
|
+
}
|