Now Playing Mathcore

    types-serviceworker
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.1 • Public • Published

    types-serviceworker

    Type definitions for ServiceWorker(and optionally Workbox)

    Install

    yarn add -D https://github.com/shqld/types-serviceworker

    Usage

    Use Triple-Slash Directives:

    /// <reference types="node_modules/types-serviceworker" />
    /// <reference types="node_modules/types-serviceworker/lib/workbox" />

    Or if you write Service Worker scripts with a dedicated tsconfig.json for that, you also can do by simply adding:

    {
      "compilerOptions": {
        "types": [/* ...others */, "node_modules/types-serviceworker"],
        /* ... */
      }
      /* ... */
    }

    NOTE: There are some caveats using types field. See this for detail.

    If types is specified, only packages listed will be included

    Credits

    types-serviceworker partially uses 2 files(src/webworkers.d.ts, src/workbox.d.ts) respectively copied from

    and modifies them under the lincenses.

    Keywords

    none

    Install

    npm i types-serviceworker

    DownloadsWeekly Downloads

    664

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    214 kB

    Total Files

    10

    Last publish

    Collaborators

    • shqld