mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-28 16:45:10 +08:00
Add missing types
This commit is contained in:
18
webpack/index.d.ts
vendored
18
webpack/index.d.ts
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user