source: frontend/node_modules/workbox-cacheable-response/CacheableResponsePlugin.d.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: 1.4 KB
Line 
1import { WorkboxPlugin } from 'workbox-core/types.js';
2import { CacheableResponseOptions } from './CacheableResponse.js';
3import './_version.js';
4/**
5 * A class implementing the `cacheWillUpdate` lifecycle callback. This makes it
6 * easier to add in cacheability checks to requests made via Workbox's built-in
7 * strategies.
8 *
9 * @memberof workbox-cacheable-response
10 */
11declare class CacheableResponsePlugin implements WorkboxPlugin {
12 private readonly _cacheableResponse;
13 /**
14 * To construct a new CacheableResponsePlugin instance you must provide at
15 * least one of the `config` properties.
16 *
17 * If both `statuses` and `headers` are specified, then both conditions must
18 * be met for the `Response` to be considered cacheable.
19 *
20 * @param {Object} config
21 * @param {Array<number>} [config.statuses] One or more status codes that a
22 * `Response` can have and be considered cacheable.
23 * @param {Object<string,string>} [config.headers] A mapping of header names
24 * and expected values that a `Response` can have and be considered cacheable.
25 * If multiple headers are provided, only one needs to be present.
26 */
27 constructor(config: CacheableResponseOptions);
28 /**
29 * @param {Object} options
30 * @param {Response} options.response
31 * @return {Response|null}
32 * @private
33 */
34 cacheWillUpdate: WorkboxPlugin['cacheWillUpdate'];
35}
36export { CacheableResponsePlugin };
Note: See TracBrowser for help on using the repository browser.