import { ModuleFederation } from '@module-federation/runtime'; import { ModuleInfo } from '@module-federation/sdk'; import { Remote } from '@module-federation/runtime/types'; import type { Federation } from '@module-federation/runtime'; interface FederationWithPrefetch extends Federation { __PREFETCH__: { entryLoading: Record>; instance: Map; __PREFETCH_EXPORTS__: Record Promise>>; }; } type PrefetchExports = Record; export interface DataPrefetchOptions { name: string; remote?: Remote; origin?: ModuleFederation; remoteSnapshot?: ModuleInfo; } export interface prefetchOptions { id: string; functionId?: string; cacheStrategy?: () => boolean; refetchParams?: any; } export declare class MFDataPrefetch { prefetchMemory: Map>; recordOutdate: Record>; private _exports; private _options; constructor(options: DataPrefetchOptions); get global(): FederationWithPrefetch['__PREFETCH__']; static getInstance(id: string): MFDataPrefetch | undefined; loadEntry(entry: string | undefined): Promise; getProjectExports(): Promise | Record; memorizeExports(exports: Record): void; getExposeExports(id: string): PrefetchExports; prefetch(prefetchOptions: prefetchOptions): any; memorize(id: string, value: any): void; markOutdate(markOptions: Omit, isOutdate: boolean): void; checkOutdate(outdateOptions: prefetchOptions): boolean; } export {};