addRoute.d.ts 711 B

12345678910111213141516171819
  1. import { PrecacheRouteOptions } from './_types.js';
  2. import './_version.js';
  3. /**
  4. * Add a `fetch` listener to the service worker that will
  5. * respond to
  6. * [network requests]{@link https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Custom_responses_to_requests}
  7. * with precached assets.
  8. *
  9. * Requests for assets that aren't precached, the `FetchEvent` will not be
  10. * responded to, allowing the event to fall through to other `fetch` event
  11. * listeners.
  12. *
  13. * @param {Object} [options] See the {@link workbox-precaching.PrecacheRoute}
  14. * options.
  15. *
  16. * @memberof workbox-precaching
  17. */
  18. declare function addRoute(options?: PrecacheRouteOptions): void;
  19. export { addRoute };