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

2.6.4 • Public • Published

Installation

npm install --save @types/html-replace-webpack-plugin

Summary

This package contains type definitions for html-replace-webpack-plugin (https://github.com/iminif/html-replace-webpack-plugin#readme).

Details

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

index.d.ts

import { Plugin } from "webpack";

// Cannot have varargs in the middle of a type, so we need to unfortunately make the rest `any[]`
// https://github.com/microsoft/TypeScript/issues/1360
type ReplacementFunction = (match: string, ...args: any[]) => string;

interface HtmlReplaceWebpackPluginOption {
    pattern: string | RegExp;
    replacement: string | ReplacementFunction;
}

declare class HtmlReplaceWebpackPlugin extends Plugin {
    constructor(options: HtmlReplaceWebpackPluginOption | HtmlReplaceWebpackPluginOption[]);
}

export = HtmlReplaceWebpackPlugin;

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: @types/webpack

Credits

These definitions were written by Alex Brick.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/html-replace-webpack-plugin

Weekly Downloads

860

Version

2.6.4

License

MIT

Unpacked Size

3.92 kB

Total Files

5

Last publish

Collaborators

  • types