@types/appcache-webpack-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.4.5 • Public • Published

Installation

npm install --save @types/appcache-webpack-plugin

Summary

This package contains type definitions for appcache-webpack-plugin (https://github.com/lettertwo/appcache-webpack-plugin).

Details

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

index.d.ts

import webpack = require("webpack");

/**
 * Generate an HTML5 Application Cache for a Webpack build
 */
declare class AppCachePlugin extends webpack.Plugin {
    AppCache: AppCachePlugin.AppCache;
    constructor(options?: AppCachePlugin.Options);
}

declare namespace AppCachePlugin {
    interface Options {
        /**
         * 'additional assets to cache
         */
        cache?: string[] | undefined;
        /**
         * Assets that may be accessed via the network.
         * @default ['*']
         */
        network?: string[] | null | undefined;
        /**
         * Fallback assets
         */
        fallback?: string[] | undefined;
        /**
         * Settings
         */
        settings?: string[] | undefined;
        /**
         * Assets in the compilation that match any of these patterns will be excluded from the manifest.
         * @default []
         */
        exclude?: Array<string | RegExp> | undefined;
        /**
         * The filename to write the appcache to
         * @default 'manifest.appcache'
         */
        output?: string | undefined;
        /**
         * @default ''
         */
        comment?: string | undefined;
    }

    class AppCache {
        constructor(
            cache: string,
            network: string[],
            fallback: string[],
            settings: string[],
            hash: string,
            comment: string,
        );
        addAsset(asset: string): void;
        size(): number;
        getManifestBody(): string;
        source(): string;
    }
}

export = AppCachePlugin;

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:04 GMT
  • Dependencies: @types/webpack

Credits

These definitions were written by Piotr Błażejewicz.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/appcache-webpack-plugin

Weekly Downloads

75

Version

1.4.5

License

MIT

Unpacked Size

5.95 kB

Total Files

5

Last publish

Collaborators

  • types