From 1f921fb60c344809f31b6090e5cef2672559f58c Mon Sep 17 00:00:00 2001 From: "Diogo Franco (Kovensky)" Date: Mon, 21 Nov 2016 15:26:04 +0900 Subject: [PATCH] Add missing types --- webpack/index.d.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/webpack/index.d.ts b/webpack/index.d.ts index c10a4b2234..6de2ca7128 100644 --- a/webpack/index.d.ts +++ b/webpack/index.d.ts @@ -347,7 +347,9 @@ declare namespace webpack { } type Rule = LoaderRule | UseRule | RulesRule | OneOfRule; - interface Plugin extends tapable.Plugin {} + interface Plugin extends tapable.Plugin { + apply (thisArg: Webpack, ...args: any[]): void + } interface Webpack { (config: Configuration, callback?: compiler.CompilerCallback): compiler.Compiler; @@ -403,6 +405,11 @@ declare namespace webpack { * Adds SourceMaps for assets. */ SourceMapDevToolPlugin: SourceMapDevToolPluginStatic; + /** + * Adds SourceMaps for assets, but wrapped inside eval statements. + * Much faster incremental build speed, but harder to debug. + */ + EvalSourceMapDevToolPlugin: SourceMapDevToolPluginStatic; /** * Enables Hot Module Replacement. (This requires records data if not in dev-server mode, recordsPath) * Generates Hot Update Chunks of each chunk in the records. @@ -422,6 +429,11 @@ declare namespace webpack { * Does not watch specified files matching provided paths or RegExps. */ WatchIgnorePlugin: WatchIgnorePluginStatic; + /** + * Uses the module name as the module id inside the bundle, instead of a number. + * Helps with debugging, but increases bundle size. + */ + NamedModulesPlugin: NamedModulesPluginStatic; } interface Optimize { @@ -535,6 +547,10 @@ declare namespace webpack { new (paths: RegExp[]): Plugin; } + interface NamedModulesPluginStatic { + new (): Plugin; + } + namespace optimize { interface DedupePluginStatic { new (): Plugin;