0.11.5 • Published 6 months ago

@types/sw-precache-webpack-plugin v0.11.5

Weekly downloads
4,201
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/sw-precache-webpack-plugin

Summary

This package contains type definitions for sw-precache-webpack-plugin (https://github.com/goldhand/sw-precache-webpack-plugin#readme).

Details

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

index.d.ts

// Type definitions for sw-precache-webpack-plugin 0.11
// Project: https://github.com/goldhand/sw-precache-webpack-plugin#readme
// Definitions by: JounQin <https://github.com/JounQin>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.7

import { Options as SwPrecacheOptions } from 'sw-precache';
import { Plugin } from 'webpack';

// workaround to override parent types
interface _Options extends SwPrecacheOptions {
    importScripts?: any;
}

declare namespace SWPrecacheWebpackPlugin {
    interface Options extends _Options {
        filename?: string | undefined;
        filepath?: string | undefined;
        staticFileGlobsIgnorePatterns?: RegExp[] | undefined;
        mergeStaticsConfig?: boolean | undefined;
        minify?: boolean | undefined;

        // override sw-precache options
        importScripts?: Array<
            | string
            | {
                  chunkName?: string | undefined;
                  filename?: string | undefined;
              }
        > | undefined;
    }
}

declare class SWPrecacheWebpackPlugin extends Plugin {
    constructor(options?: SWPrecacheWebpackPlugin.Options);
}

export = SWPrecacheWebpackPlugin;

Additional Details

Credits

These definitions were written by JounQin.

0.11.3

8 months ago

0.11.4

7 months ago

0.11.5

6 months ago

0.11.2

3 years ago

0.11.1

3 years ago

0.11.0

6 years ago