123456789101112131415161718192021222324252627 |
- import { Strategy } from './Strategy.js';
- import { StrategyHandler } from './StrategyHandler.js';
- import './_version.js';
- /**
- * An implementation of a
- * [cache-only]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#cache-only}
- * request strategy.
- *
- * This class is useful if you want to take advantage of any
- * [Workbox plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}.
- *
- * If there is no cache match, this will throw a `WorkboxError` exception.
- *
- * @extends module:workbox-strategies.Strategy
- * @memberof module:workbox-strategies
- */
- declare class CacheOnly extends Strategy {
- /**
- * @private
- * @param {Request|string} request A request to run this strategy for.
- * @param {module:workbox-strategies.StrategyHandler} handler The event that
- * triggered the request.
- * @return {Promise<Response>}
- */
- _handle(request: Request, handler: StrategyHandler): Promise<Response>;
- }
- export { CacheOnly };
|