import type { AppEnvironments, PreloadNode } from '../types.ts'; /** * The PreloadsManager class is used to resolve and import preload modules. * Preload modules are files that should be loaded before the application starts, * typically for initialization code or setup tasks. * * The class relies on "import.meta.resolve" to resolve the provider modules from * the root of the application. * * @example * const manager = new PreloadsManager({ environment: 'web' }) * manager.use([{ file: () => import('./preloads/routes'), environment: ['web'] }]) * await manager.import() */ export declare class PreloadsManager { #private; /** * Creates a new PreloadsManager instance * * @param options - Configuration options including environment */ constructor(options: { environment: AppEnvironments; }); /** * Registers an array of preload modules to be imported later. * Replaces any previously registered preloads. * * @param {PreloadNode[]} list - Array of preload modules to register * @returns {this} Returns the PreloadsManager instance for method chaining */ use(list: PreloadNode[]): this; /** * Changes the environment context for filtering preloads. * Used when the application environment changes after manager creation. * * @param {AppEnvironments} environment - The new environment to set * @returns {this} Returns the PreloadsManager instance for method chaining */ setEnvironment(environment: AppEnvironments): this; /** * Imports all registered preload modules that match the current environment. * Clears the preloads list after importing to prevent duplicate imports. * * @returns {Promise} Promise that resolves when all preload modules have been imported */ import(): Promise; }