import { PluginStore, FeatureFlags, PluginLoaderOptions, PluginStoreOptions, PluginManifest } from '@openshift/dynamic-plugin-sdk'; export declare const GLOBAL_NAMESPACE = "__scalprum__"; export type AppMetadata = T & { name: string; appId?: string; elementId?: string; rootLocation?: string; scriptLocation?: string; manifestLocation?: string; pluginManifest?: PluginManifest; }; export interface AppsConfig { [key: string]: AppMetadata; } export type PrefetchFunction = (ScalprumApi: Record | undefined) => Promise; export type ExposedScalprumModule = { [importName: string]: T; } & { prefetch?: PrefetchFunction

; }; export type ScalprumModule = { cachedModule?: ExposedScalprumModule; prefetchPromise?: ReturnType; }; export interface Factory { init: (sharing: any) => void; modules: { [key: string]: ExposedScalprumModule; }; expiration: Date; } export interface ScalprumOptions { cacheTimeout: number; enableScopeWarning: boolean; } export type Scalprum = Record> = { appsConfig: AppsConfig; pendingInjections: { [key: string]: Promise; }; pendingLoading: { [key: string]: Promise; }; pendingPrefetch: { [key: string]: Promise; }; existingScopes: Set; exposedModules: { [moduleId: string]: ExposedScalprumModule; }; scalprumOptions: ScalprumOptions; api: T; pluginStore: PluginStore; }; export type Container = Window & Factory; export declare const getModuleIdentifier: (scope: string, module: string) => string; export declare const getScalprum: () => Scalprum>; export declare const initSharedScope: () => Promise; /** * Get the webpack share scope object. */ export declare const getSharedScope: (enableScopeWarning?: boolean) => any; export declare const handlePrefetchPromise: (id: string, prefetch?: Promise) => void; export declare const getCachedModule: (scope: string, module: string) => ScalprumModule; export declare const setPendingPrefetch: (id: string, prefetch: Promise) => void; export declare const getPendingPrefetch: (id: string) => Promise | undefined; export declare const removePrefetch: (id: string) => void; export declare const resolvePendingInjection: (id: string) => void; export declare const setPendingLoading: (scope: string, module: string, promise: Promise) => Promise; export declare const getPendingLoading: (scope: string, module: string) => Promise | undefined; export declare const preloadModule: (scope: string, module: string, processor?: (manifest: any) => string[]) => Promise; export declare const getModule: (scope: string, module: string, importName?: string) => Promise; export declare const initialize: = Record>({ appsConfig, api, options, pluginStoreFeatureFlags, pluginLoaderOptions, pluginStoreOptions, }: { appsConfig: AppsConfig; api?: T; options?: Partial; pluginStoreFeatureFlags?: FeatureFlags; pluginLoaderOptions?: PluginLoaderOptions; pluginStoreOptions?: PluginStoreOptions; }) => Scalprum; export declare const removeScalprum: () => void; export declare const getAppData: (name: string) => AppMetadata; export declare function processManifest(moduleManifest: string | PluginManifest, scope: string, module: string, processor?: (manifest: any) => string[]): Promise;