source: frontend/node_modules/workbox-precaching/src/precacheAndRoute.ts

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 995 bytes
RevLine 
[9af201e]1/*
2 Copyright 2019 Google LLC
3
4 Use of this source code is governed by an MIT-style
5 license that can be found in the LICENSE file or at
6 https://opensource.org/licenses/MIT.
7*/
8
9import {addRoute} from './addRoute.js';
10import {precache} from './precache.js';
11import {PrecacheRouteOptions, PrecacheEntry} from './_types.js';
12import './_version.js';
13
14/**
15 * This method will add entries to the precache list and add a route to
16 * respond to fetch events.
17 *
18 * This is a convenience method that will call
19 * {@link workbox-precaching.precache} and
20 * {@link workbox-precaching.addRoute} in a single call.
21 *
22 * @param {Array<Object|string>} entries Array of entries to precache.
23 * @param {Object} [options] See the
24 * {@link workbox-precaching.PrecacheRoute} options.
25 *
26 * @memberof workbox-precaching
27 */
28function precacheAndRoute(
29 entries: Array<PrecacheEntry | string>,
30 options?: PrecacheRouteOptions,
31): void {
32 precache(entries);
33 addRoute(options);
34}
35
36export {precacheAndRoute};
Note: See TracBrowser for help on using the repository browser.