/** * Manages loaded components and component load promises. */ export declare class ComponentStore { private _componentPromises; private _components; private _componentVersions; constructor(); /** * Try and get a component load promise. * * @param id - Component id * @param version - Component version * * @returns If the component load promise exists, return it */ tryGetComponent(id: string, version: string): Promise | undefined; /** * Try and get a loaded component. * * @param id - Component id * @param version - Component version * * @returns If the component has been loaded, return it */ tryGetComponentReference(id: string, version: string): T | undefined; /** * Get all loaded components. * * @remarks * This is not meant to be used as the regular behavior of ComponentStore as it's exposing its internals. * This exists only to ensure the SystemJS side-loader knows about all components loaded by RequireJS. * * @returns Map of all the loaded components */ getAllComponentReferences(): Map; /** * Try and get a component load promise by id. * * @param id - Component id * * @returns If, and only if, one component with the id exists, return a promise * which will resolve to the component. */ tryGetComponentById(id: string): Promise | undefined; /** * Get a component load promise by id. * * @remarks If there is no component or there are multiple components an exception will be thrown. * * @param id - Component id * * @returns If, and only if, one component with the id exists, return a promise * which will resolve to the component. */ getComponentById(id: string): Promise; /** * Store a component load promise. * * @param id - Component id * @param version - Component version * @param componentPromise - Component load promise * * @returns A boolean indicating if the component load promise was stored */ storeComponent(id: string, version: string, componentPromise: Promise): boolean; /** * Store a loaded component. * * @param id - Component id * @param version - Component version * @param component - Loaded component * * @returns A boolean indicating if the component was stored */ storeLoadedComponent(id: string, version: string, component: T): boolean; /** * Delete a component. * * @param id - Component id * @param version - Component version * * @returns A boolean indicating if the component was deleted */ deleteComponent(id: string, version: string): boolean; /** * This is only used to satisfy the old ComponentStore interface. * todo: Delete when graduating tiny loader flight */ _getComponentById(id: string): Promise; /** * Track stored versions for a component. * * @param id - Component id * @param version - Component version */ private _storeVersion; } //# sourceMappingURL=ComponentStore.d.ts.map