Urara-Blog/node_modules/.pnpm-store/v3/files/6f/8a9e614649e95b60b247201c060822ebbb4ab84bdd98c4974ce6b87edb3b2b960b2d975ee32f8e70d671e639f67456d05a583d3544299d13b840c6f098f478
2022-08-14 01:14:53 +08:00

85 lines
2.4 KiB
Text

/*
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';
export interface InstallResult {
updatedURLs: string[];
notUpdatedURLs: string[];
}
export interface CleanupResult {
deletedCacheRequests: string[];
}
export declare interface PrecacheEntry {
integrity?: string;
url: string;
revision?: string | null;
}
export interface PrecacheRouteOptions {
directoryIndex?: string;
ignoreURLParametersMatching?: RegExp[];
cleanURLs?: boolean;
urlManipulation?: urlManipulation;
}
export type urlManipulation = ({url}: {url: URL}) => URL[];
// * * * 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 workbox-precaching
*/
/**
* @typedef {Object} CleanupResult
* @property {Array<string>} deletedCacheRequests List of URLs that were deleted
* while cleaning up the cache.
*
* @memberof 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 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 workbox-precaching
*/