cacheWrapper.d.ts 606 B

1234567891011121314151617
  1. import { WorkboxPlugin } from '../types.js';
  2. import '../_version.js';
  3. interface MatchWrapperOptions {
  4. cacheName: string;
  5. request: Request;
  6. event?: Event;
  7. plugins?: WorkboxPlugin[];
  8. matchOptions?: CacheQueryOptions;
  9. }
  10. interface PutWrapperOptions extends MatchWrapperOptions {
  11. response: Response;
  12. }
  13. export declare const cacheWrapper: {
  14. put: ({ cacheName, request, response, event, plugins, matchOptions, }: PutWrapperOptions) => Promise<void>;
  15. match: ({ cacheName, request, event, matchOptions, plugins, }: MatchWrapperOptions) => Promise<Response | undefined>;
  16. };
  17. export {};