Updated definition of type for case-sensitive-paths-webpack-plugin (#36830)

* updated definition

* added test

* fixed error

* reverted changes not related to pull request
This commit is contained in:
Max Boguslavsky 2019-07-13 00:50:28 +03:00 committed by Armando Aguirre
parent c2a682fcaf
commit f8fe502c51
3 changed files with 14 additions and 5 deletions

View File

@ -1,15 +1,20 @@
import { Configuration } from 'webpack';
import { Compiler, Configuration, Plugin } from 'webpack';
import CaseSensitivePathsWebpackPlugin = require('case-sensitive-paths-webpack-plugin');
const options: CaseSensitivePathsWebpackPlugin.Options = {
debug: true,
};
const compiler: Compiler = new Compiler();
const plugin: Plugin = new CaseSensitivePathsWebpackPlugin();
plugin.apply(compiler);
const c: Configuration = {
plugins: [
new CaseSensitivePathsWebpackPlugin(),
new CaseSensitivePathsWebpackPlugin({
debug: true
debug: true,
}),
plugin,
],
};

View File

@ -4,12 +4,14 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import { Plugin } from 'webpack';
import { Plugin, Compiler } from 'webpack';
export = CaseSensitivePathsWebpackPlugin;
declare class CaseSensitivePathsWebpackPlugin extends Plugin {
constructor(options?: CaseSensitivePathsWebpackPlugin.Options);
apply(compiler: Compiler): void;
}
declare namespace CaseSensitivePathsWebpackPlugin {

View File

@ -6,14 +6,16 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import { Plugin, compilation } from 'webpack';
import { Plugin, compilation, Compiler } from 'webpack';
import { AsyncSeriesWaterfallHook } from 'tapable';
import { Options as HtmlMinifierOptions } from 'html-minifier';
export = HtmlWebpackPlugin;
declare class HtmlWebpackPlugin extends Plugin {
constructor(options?: HtmlWebpackPlugin.Options);
constructor(options?: HtmlWebpackPlugin.Options);
apply(compiler: Compiler): void;
}
declare namespace HtmlWebpackPlugin {