_types.js
1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
Copyright 2018 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import './_version.js';
// * * * IMPORTANT! * * *
// ------------------------------------------------------------------------- //
// jdsoc type definitions cannot be declared above TypeScript definitions or
// they'll be stripped from the built `.js` files, and they'll only be in the
// `d.ts` files, which aren't read by the jsdoc generator. As a result we
// have to put declare them below.
/**
* @typedef {Object} InstallResult
* @property {Array<string>} updatedURLs List of URLs that were updated during
* installation.
* @property {Array<string>} notUpdatedURLs List of URLs that were already up to
* date.
*
* @memberof module:workbox-precaching
*/
/**
* @typedef {Object} CleanupResult
* @property {Array<string>} deletedCacheRequests List of URLs that were deleted
* while cleaning up the cache.
*
* @memberof module:workbox-precaching
*/
/**
* @typedef {Object} PrecacheEntry
* @property {string} url URL to precache.
* @property {string} [revision] Revision information for the URL.
* @property {string} [integrity] Integrity metadata that will be used when
* making the network request for the URL.
*
* @memberof module:workbox-precaching
*/
/**
* The "urlManipulation" callback can be used to determine if there are any
* additional permutations of a URL that should be used to check against
* the available precached files.
*
* For example, Workbox supports checking for '/index.html' when the URL
* '/' is provided. This callback allows additional, custom checks.
*
* @callback ~urlManipulation
* @param {Object} context
* @param {URL} context.url The request's URL.
* @return {Array<URL>} To add additional urls to test, return an Array of
* URLs. Please note that these **should not be strings**, but URL objects.
*
* @memberof module:workbox-precaching
*/