@types/workbox-sw
TypeScript icon, indicating that this package has built-in type declarations

4.3.7 • Public • Published

Installation

npm install --save @types/workbox-sw

Summary

This package contains type definitions for workbox-sw (https://github.com/GoogleChrome/workbox).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/workbox-sw.

index.d.ts

import * as WorkboxBackgroundSync from "workbox-background-sync";
import * as WorkboxBroadcastUpdate from "workbox-broadcast-update";
import * as WorkboxCacheableResponse from "workbox-cacheable-response";
import * as WorkboxCore from "workbox-core";
import * as WorkboxExpiration from "workbox-expiration";
import * as WorkboxGoogleAnalytics from "workbox-google-analytics";
import * as WorkboxNavigationPreload from "workbox-navigation-preload";
import * as WorkboxPrecaching from "workbox-precaching";
import * as WorkboxRangeRequests from "workbox-range-requests";
import * as WorkboxRouting from "workbox-routing";
import * as WorkboxStrategies from "workbox-strategies";
import * as WorkboxStreams from "workbox-streams";

declare global {
    namespace workbox {
        const backgroundSync: typeof WorkboxBackgroundSync;
        const broadcastUpdate: typeof WorkboxBroadcastUpdate;
        const cacheableResponse: typeof WorkboxCacheableResponse;
        const core: typeof WorkboxCore;
        const expiration: typeof WorkboxExpiration;
        const googleAnalytics: typeof WorkboxGoogleAnalytics;
        const navigationPreload: typeof WorkboxNavigationPreload;
        const precaching: typeof WorkboxPrecaching;
        const rangeRequests: typeof WorkboxRangeRequests;
        const routing: typeof WorkboxRouting;
        const strategies: typeof WorkboxStrategies;
        const streams: typeof WorkboxStreams;

        function loadModule(moduleName: string): void;

        function setConfig(options?: WorkboxOptions): void;

        interface WorkboxOptions {
            debug?: boolean | undefined;
            modulePathCb?: ModulePathCallback | undefined;
            modulePathPrefix?: string | undefined;
        }

        type ModulePathCallback = (moduleName: string, debug: boolean) => string;
    }
}

Additional Details

Credits

These definitions were written by Frederik Wessberg, and Jason Kwok.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/workbox-sw

Weekly Downloads

7,811

Version

4.3.7

License

MIT

Unpacked Size

8.15 kB

Total Files

5

Last publish

Collaborators

  • types