import type { IClientSideComponentManifest } from '@microsoft/sp-module-interfaces'; import type { ILoadScriptOptions } from '../../interfaces/ILoadScriptOptions'; import type { ServiceScope } from '@microsoft/sp-core-library'; export interface IModuleLoader { /** * Delete a loaded and/or pending component. * * @param manifest - Manifest of the component to be deleted. */ delete(manifest: IClientSideComponentManifest): void; /** * Ensure `module` is present in the module loader and remove any pre-existing module. * * @param name - Name of the module in the module loader. * @param module - Module to ensure. */ ensure(name: string, module: unknown): void; /** * Load a component through the module loader. * * @param moduleName - Name of the module. * @param globalName - (Optional) Global name of the module. */ load(moduleName: string, globalName?: string): Promise; /** * Load an SPFx component through the module loader. * * @param manifest - Manifest of the component to be loaded */ loadComponent(manifest: IClientSideComponentManifest): Promise; /** * Load the entry point of an SPFx component. * * @param manifest - Manifest of the component to be loaded. * @param name - (Optional) Name of the component in the module loader. */ loadEntryPoint(manifest: IClientSideComponentManifest, name?: string, globalName?: string): Promise; /** * Load a script through the module loader. * * @param url - URL of the script to be loaded. * @param options - (Optional) Configuration for how the script should be loaded. */ loadScript(url: string, options?: ILoadScriptOptions): Promise; } /** * Used by `SPComponentLoader` to define the contract for creating an `IModuleLoader` instance. */ export interface IModuleLoaderConstructor { new (serviceScope: ServiceScope, useSecondaryCdn: boolean): IModuleLoader; } //# sourceMappingURL=IModuleLoader.d.ts.map