deleteOutdatedCaches.d.ts 932 B

123456789101112131415161718192021
  1. import '../_version.js';
  2. /**
  3. * Cleans up incompatible precaches that were created by older versions of
  4. * Workbox, by a service worker registered under the current scope.
  5. *
  6. * This is meant to be called as part of the `activate` event.
  7. *
  8. * This should be safe to use as long as you don't include `substringToFind`
  9. * (defaulting to `-precache-`) in your non-precache cache names.
  10. *
  11. * @param {string} currentPrecacheName The cache name currently in use for
  12. * precaching. This cache won't be deleted.
  13. * @param {string} [substringToFind='-precache-'] Cache names which include this
  14. * substring will be deleted (excluding `currentPrecacheName`).
  15. * @return {Array<string>} A list of all the cache names that were deleted.
  16. *
  17. * @private
  18. * @memberof module:workbox-precaching
  19. */
  20. declare const deleteOutdatedCaches: (currentPrecacheName: string, substringToFind?: string) => Promise<string[]>;
  21. export { deleteOutdatedCaches };