12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- import { RouteHandlerObject, RouteHandlerCallbackOptions, WorkboxPlugin } from 'workbox-core/types.js';
- import './_version.js';
- interface CacheOnlyOptions {
- cacheName?: string;
- plugins?: WorkboxPlugin[];
- matchOptions?: CacheQueryOptions;
- }
- declare class CacheOnly implements RouteHandlerObject {
- private readonly _cacheName;
- private readonly _plugins;
- private readonly _matchOptions?;
-
- constructor(options?: CacheOnlyOptions);
- /**
- * This method will perform a request strategy and follows an API that
- * will work with the
- * [Workbox Router]{@link module:workbox-routing.Router}.
- *
- * @param {Object} options
- * @param {Request|string} options.request A request to run this strategy for.
- * @param {Event} [options.event] The event that triggered the request.
- * @return {Promise<Response>}
- */
- handle({ event, request }: RouteHandlerCallbackOptions): Promise<Response>;
- }
- export { CacheOnly };
|