createHandlerBoundToURL.d.ts 834 B

123456789101112131415161718192021
  1. import { RouteHandlerCallback } from 'workbox-core/types.js';
  2. import './_version.js';
  3. /**
  4. * Helper function that calls
  5. * {@link PrecacheController#createHandlerBoundToURL} on the default
  6. * {@link PrecacheController} instance.
  7. *
  8. * If you are creating your own {@link PrecacheController}, then call the
  9. * {@link PrecacheController#createHandlerBoundToURL} on that instance,
  10. * instead of using this function.
  11. *
  12. * @param {string} url The precached URL which will be used to lookup the
  13. * `Response`.
  14. * @param {boolean} [fallbackToNetwork=true] Whether to attempt to get the
  15. * response from the network if there's a precache miss.
  16. * @return {workbox-routing~handlerCallback}
  17. *
  18. * @memberof workbox-precaching
  19. */
  20. declare function createHandlerBoundToURL(url: string): RouteHandlerCallback;
  21. export { createHandlerBoundToURL };