/** * AssetPipeline.ts — Sprint 7 * * A lightweight, type-keyed asset loading pipeline with: * - Per-type loader registration * - Content-addressable cache (type + path key) * - Failed-load exclusion from cache * - evict(), clear(), isLoaded(), loadedCount * * Designed for use in SceneRunner and test contexts where you need * deterministic, promise-based asset loading with no framework dependencies. */ /** A loader function maps a path string → an arbitrary asset value. */ export type AssetLoader = (path: string) => Promise; export declare class AssetPipeline { private loaders; private cache; /** Register (or replace) a loader for an asset type. */ registerLoader(type: string, loader: AssetLoader): void; /** Whether a loader is registered for the given type. */ hasLoader(type: string): boolean; /** * Load an asset by type and path. * * - Returns the cached asset if already loaded. * - Calls the registered loader and caches the result. * - Throws if no loader is registered for the type. * - Does NOT cache failed loads, so a subsequent call may retry. */ load(type: string, path: string): Promise; /** Whether the asset at (type, path) is currently cached. */ isLoaded(type: string, path: string): boolean; /** Remove a single asset from the cache. */ evict(type: string, path: string): void; /** Remove all assets from the cache. */ clear(): void; /** Number of currently cached assets. */ get loadedCount(): number; } //# sourceMappingURL=AssetPipeline.d.ts.map