ngx-mfe
Version:
A library for working with MFE in Angular in a plugin-based approach and with Angular routing.
38 lines (37 loc) • 1.21 kB
TypeScript
export interface StandaloneRemoteComponent {
/**
* Remote app name, specified in ModuleFederationPlugin in name config.
*/
app: string;
/**
* The key of the exposed component.
*/
component: string;
}
export interface RemoteComponentWithModule {
/**
* Remote app name, specified in ModuleFederationPlugin in name config.
*/
app: string;
/**
* The key of the exposed component.
*/
component: string;
/**
* The key of the exposed module in which the component is declared.
*/
module: string;
}
export type RemoteComponent = StandaloneRemoteComponent | RemoteComponentWithModule;
/**
* Type Guard for RemoteComponent, checks if RemoteComponent is Standalone
* @param remoteComponent Mfe Remote Component
* @returns
*/
export declare function isStandaloneRemoteComponent(remoteComponent: RemoteComponent): remoteComponent is StandaloneRemoteComponent;
/**
* Type Guard for RemoteComponent, checks if RemoteComponent is Modular
* @param remoteComponent Mfe Remote Component
* @returns
*/
export declare function isRemoteComponentWithModule(remoteComponent: RemoteComponent): remoteComponent is RemoteComponentWithModule;