precache.d.ts 826 B

1234567891011121314151617181920212223
  1. import { PrecacheEntry } from './_types.js';
  2. import './_version.js';
  3. /**
  4. * Adds items to the precache list, removing any duplicates and
  5. * stores the files in the
  6. * {@link workbox-core.cacheNames|"precache cache"} when the service
  7. * worker installs.
  8. *
  9. * This method can be called multiple times.
  10. *
  11. * Please note: This method **will not** serve any of the cached files for you.
  12. * It only precaches files. To respond to a network request you call
  13. * {@link workbox-precaching.addRoute}.
  14. *
  15. * If you have a single array of files to precache, you can just call
  16. * {@link workbox-precaching.precacheAndRoute}.
  17. *
  18. * @param {Array<Object|string>} [entries=[]] Array of entries to precache.
  19. *
  20. * @memberof workbox-precaching
  21. */
  22. declare function precache(entries: Array<PrecacheEntry | string>): void;
  23. export { precache };