export = CacheFacade; declare class CacheFacade { /** * @param {Cache} cache the root cache * @param {string} name the child cache name * @param {string | HashConstructor} hashFunction the hash function to use */ constructor(cache: Cache, name: string, hashFunction: string | HashConstructor); _cache: import("./Cache"); _name: string; _hashFunction: any; /** * @param {string} name the child cache name# * @returns {CacheFacade} child cache */ getChildCache(name: string): CacheFacade; /** * @param {string} identifier the cache identifier * @param {Etag | null} etag the etag * @returns {ItemCacheFacade} item cache */ getItemCache(identifier: string, etag: Etag | null): ItemCacheFacade; /** * @param {HashableObject} obj an hashable object * @returns {Etag} an etag that is lazy hashed */ getLazyHashedEtag(obj: HashableObject): Etag; /** * @param {Etag} a an etag * @param {Etag} b another etag * @returns {Etag} an etag that represents both */ mergeEtags(a: Etag, b: Etag): Etag; /** * @template T * @param {string} identifier the cache identifier * @param {Etag | null} etag the etag * @param {CallbackCache} callback signals when the value is retrieved * @returns {void} */ get(identifier: string, etag: Etag | null, callback: CallbackCache): void; /** * @template T * @param {string} identifier the cache identifier * @param {Etag | null} etag the etag * @returns {Promise} promise with the data */ getPromise(identifier: string, etag: Etag | null): Promise; /** * @template T * @param {string} identifier the cache identifier * @param {Etag | null} etag the etag * @param {T} data the value to store * @param {CallbackCache} callback signals when the value is stored * @returns {void} */ store(identifier: string, etag: Etag | null, data: T_2, callback: CallbackCache): void; /** * @template T * @param {string} identifier the cache identifier * @param {Etag | null} etag the etag * @param {T} data the value to store * @returns {Promise} promise signals when the value is stored */ storePromise(identifier: string, etag: Etag | null, data: T_3): Promise; /** * @template T * @param {string} identifier the cache identifier * @param {Etag | null} etag the etag * @param {function(CallbackNormalErrorCache): void} computer function to compute the value if not cached * @param {CallbackNormalErrorCache} callback signals when the value is retrieved * @returns {void} */ provide(identifier: string, etag: Etag | null, computer: (arg0: CallbackNormalErrorCache) => void, callback: CallbackNormalErrorCache): void; /** * @template T * @param {string} identifier the cache identifier * @param {Etag | null} etag the etag * @param {function(): Promise | T} computer function to compute the value if not cached * @returns {Promise} promise with the data */ providePromise(identifier: string, etag: Etag | null, computer: () => T_5 | Promise): Promise; } declare namespace CacheFacade { export { ItemCacheFacade, MultiItemCache, Cache, Etag, WebpackError, HashableObject, HashConstructor, CallbackCache, CallbackNormalErrorCache }; } type Etag = import("./Cache").Etag; declare class ItemCacheFacade { /** * @param {Cache} cache the root cache * @param {string} name the child cache item name * @param {Etag | null} etag the etag */ constructor(cache: Cache, name: string, etag: Etag | null); _cache: import("./Cache"); _name: string; _etag: import("./Cache").Etag | null; /** * @template T * @param {CallbackCache} callback signals when the value is retrieved * @returns {void} */ get(callback: CallbackCache): void; /** * @template T * @returns {Promise} promise with the data */ getPromise(): Promise; /** * @template T * @param {T} data the value to store * @param {CallbackCache} callback signals when the value is stored * @returns {void} */ store(data: T_2, callback: CallbackCache): void; /** * @template T * @param {T} data the value to store * @returns {Promise} promise signals when the value is stored */ storePromise(data: T_3): Promise; /** * @template T * @param {function(CallbackNormalErrorCache): void} computer function to compute the value if not cached * @param {CallbackNormalErrorCache} callback signals when the value is retrieved * @returns {void} */ provide(computer: (arg0: CallbackNormalErrorCache) => void, callback: CallbackNormalErrorCache): void; /** * @template T * @param {function(): Promise | T} computer function to compute the value if not cached * @returns {Promise} promise with the data */ providePromise(computer: () => T_5 | Promise): Promise; } type HashableObject = import("./cache/getLazyHashedEtag").HashableObject; type CallbackCache = (err?: (WebpackError | null) | undefined, result?: T | undefined) => void; type CallbackNormalErrorCache = (err?: (Error | null) | undefined, result?: T | undefined) => void; type Cache = import("./Cache"); type HashConstructor = any; /** @typedef {import("./Cache")} Cache */ /** @typedef {import("./Cache").Etag} Etag */ /** @typedef {import("./WebpackError")} WebpackError */ /** @typedef {import("./cache/getLazyHashedEtag").HashableObject} HashableObject */ /** @typedef {any} HashConstructor */ /** * @template T * @callback CallbackCache * @param {(WebpackError | null)=} err * @param {T=} result * @returns {void} */ /** * @template T * @callback CallbackNormalErrorCache * @param {(Error | null)=} err * @param {T=} result * @returns {void} */ declare class MultiItemCache { /** * @param {ItemCacheFacade[]} items item caches */ constructor(items: ItemCacheFacade[]); _items: ItemCacheFacade[]; /** * @template T * @param {CallbackCache} callback signals when the value is retrieved * @returns {void} */ get(callback: CallbackCache): void; /** * @template T * @returns {Promise} promise with the data */ getPromise(): Promise; /** * @template T * @param {T} data the value to store * @param {CallbackCache} callback signals when the value is stored * @returns {void} */ store(data: T_2, callback: CallbackCache): void; /** * @template T * @param {T} data the value to store * @returns {Promise} promise signals when the value is stored */ storePromise(data: T_3): Promise; } type WebpackError = import("./WebpackError");