index.d.ts 649 B

1234567891011121314151617181920212223
  1. import { disable } from './disable.js';
  2. import { enable } from './enable.js';
  3. import { isSupported } from './isSupported.js';
  4. import './_version.js';
  5. interface NavigationPreloadState {
  6. enabled?: boolean;
  7. headerValue?: string;
  8. }
  9. interface NavigationPreloadManager {
  10. disable(): Promise<void>;
  11. enable(): Promise<void>;
  12. getState(): Promise<NavigationPreloadState>;
  13. setHeaderValue(value: string): Promise<void>;
  14. }
  15. declare global {
  16. interface ServiceWorkerRegistration {
  17. readonly navigationPreload: NavigationPreloadManager;
  18. }
  19. }
  20. /**
  21. * @module workbox-navigation-preload
  22. */
  23. export { disable, enable, isSupported };