import { Type } from '@angular/core'; import { AsyncSubject } from 'rxjs'; import { RemoteComponentWithModule, RemoteComponent, StandaloneRemoteComponent } from '../interfaces'; import { ComponentWithNgModuleRef } from '../types'; import * as i0 from "@angular/core"; /** * Cache of the loaded micro-frontend apps. * * Main reasons to create cache: * 1) Avoid race condition, when same micro-frontend are requested twice or more times at the same time. * 2) Cache already loaded MFE component and dont make same request twice. */ export declare class RemoteComponentsCache { private readonly _map; /** * Register a new micro-frontend cache. * @param remoteComponent Mfe Remote Component */ register(remoteComponent: RemoteComponent): void; /** * Unregister a micro-frontend cache. * @param remoteComponent Mfe Remote Component */ unregister(remoteComponent: RemoteComponent): void; /** * Checks that specified micro-frontend app already registered. * @param remoteComponent Mfe Remote Component */ isRegistered(remoteComponent: RemoteComponent): boolean; /** * Set to cache ComponentWithNgModuleRef of micro-frontend. * @param remoteComponent Mfe Remote Component * @param value ComponentWithNgModuleRef for that micro-frontend */ setValue(remoteComponent: RemoteComponentWithModule, value: ComponentWithNgModuleRef): void; setValue(remoteComponent: StandaloneRemoteComponent, value: Type): void; /** * Sets the error that occurs in the loading and compiling micro-frontend. * @param remoteComponent Mfe Remote Component * @param error Error */ setError(remoteComponent: RemoteComponent, error: any): void; /** * Gets ComponentWithNgModuleRef or Component Class of the micro-frontend. * * --------------------- * Returns ComponentWithNgModuleRef of MFE for component with module, * or returns Component Class of MFE for standalone component. * @param remoteComponent Mfe Remote Component */ getValue(remoteComponent: RemoteComponentWithModule): Promise>; getValue(remoteComponent: StandaloneRemoteComponent): Promise>; /** * Gets the AsyncSubject cache value from Map * @param remoteComponent Mfe Remote Component */ protected getCache(remoteComponent: RemoteComponentWithModule): AsyncSubject>; protected getCache(remoteComponent: StandaloneRemoteComponent): AsyncSubject>; /** * Generates a cache key based on RemoteComponent * @param remoteComponent Mfe Remote Component */ protected generateKey(remoteComponent: RemoteComponent): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }