precacheAndRoute.d.ts 904 B

123456789101112131415161718192021222324
  1. import { FetchListenerOptions } from './utils/addFetchListener.js';
  2. import { PrecacheEntry } from './_types.js';
  3. import './_version.js';
  4. declare global {
  5. interface WorkerGlobalScope {
  6. __WB_MANIFEST: Array<PrecacheEntry | string>;
  7. }
  8. }
  9. /**
  10. * This method will add entries to the precache list and add a route to
  11. * respond to fetch events.
  12. *
  13. * This is a convenience method that will call
  14. * [precache()]{@link module:workbox-precaching.precache} and
  15. * [addRoute()]{@link module:workbox-precaching.addRoute} in a single call.
  16. *
  17. * @param {Array<Object|string>} entries Array of entries to precache.
  18. * @param {Object} [options] See
  19. * [addRoute() options]{@link module:workbox-precaching.addRoute}.
  20. *
  21. * @memberof module:workbox-precaching
  22. */
  23. declare function precacheAndRoute(entries: Array<PrecacheEntry | string>, options?: FetchListenerOptions): void;
  24. export { precacheAndRoute };