import type { RuntimeCaching } from "../types.js"; import type { FallbacksOptions } from "./fallbacks.js"; import { type HandlePrecachingOptions } from "./handlePrecaching.js"; import type { GoogleAnalyticsInitializeOptions } from "./initializeGoogleAnalytics.js"; import type { PrecacheController } from "./PrecacheController.js"; import type { Router } from "./Router.js"; /** * Options for {@linkcode installSerwist}. * * @deprecated */ export interface InstallSerwistOptions extends Omit { /** * An optional {@linkcode PrecacheController} instance. If not provided, the singleton * {@linkcode PrecacheController} will be used. */ precacheController?: PrecacheController; /** * An optional {@linkcode Router} instance. If not provided, the singleton {@linkcode Router} * will be used. */ router?: Router; /** * Forces the waiting service worker to become the active one. * * @see https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/skipWaiting */ skipWaiting?: boolean; /** * Imports external scripts. They are executed in the order they * are passed. * * @see https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/importScripts */ importScripts?: string[]; /** * Enables navigation preloading if it is supported. * * @see https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/navigationPreload */ navigationPreload?: boolean; /** * Modifies the prefix of the default cache names used by Serwist packages. */ cacheId?: string | undefined; /** * Claims any currently available clients once the service worker * becomes active. This is normally used in conjunction with `skipWaiting()`. * * @default false */ clientsClaim?: boolean; /** * A list of caching strategies. */ runtimeCaching?: RuntimeCaching[]; /** * Your configuration for `@serwist/google-analytics`. This plugin is * only initialized when this option is not `undefined` or `false`. */ offlineAnalyticsConfig?: GoogleAnalyticsInitializeOptions | boolean; /** * Disables Serwist's logging in development mode. * * @default false */ disableDevLogs?: boolean; /** * Precaches routes so that they can be used as a fallback when * a Strategy fails to generate a response. */ fallbacks?: Pick; } /** * Abstracts away the core APIs of Serwist. * * @param options - `installSerwist` options. * @deprecated */ export declare const installSerwist: ({ precacheController, router, precacheEntries, precacheOptions, cleanupOutdatedCaches, navigateFallback, navigateFallbackAllowlist, navigateFallbackDenylist, skipWaiting, importScripts, navigationPreload, cacheId, clientsClaim, runtimeCaching, offlineAnalyticsConfig, disableDevLogs, fallbacks, }: InstallSerwistOptions) => void; //# sourceMappingURL=installSerwist.d.ts.map