setDefaultHandler.d.ts 561 B

12345678910111213141516
  1. import { Handler } from './_types.js';
  2. import './_version.js';
  3. /**
  4. * Define a default `handler` that's called when no routes explicitly
  5. * match the incoming request.
  6. *
  7. * Without a default handler, unmatched requests will go against the
  8. * network as if there were no service worker present.
  9. *
  10. * @param {module:workbox-routing~handlerCallback} handler A callback
  11. * function that returns a Promise resulting in a Response.
  12. *
  13. * @memberof module:workbox-routing
  14. */
  15. declare function setDefaultHandler(handler: Handler): void;
  16. export { setDefaultHandler };