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.