UNPKG

834 BTypeScriptView Raw
1import { RouteHandlerCallback } from 'workbox-core/types.js';
2import './_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 */
20declare function createHandlerBoundToURL(url: string): RouteHandlerCallback;
21export { createHandlerBoundToURL };